Click here to Skip to main content
15,867,986 members
Home / Discussions / Database
   

Database

 
GeneralRe: how to return primary key when insert statement violates unique constraint Pin
Nico Haegens10-May-14 23:07
professionalNico Haegens10-May-14 23:07 
GeneralRe: how to return primary key when insert statement violates unique constraint Pin
PIEBALDconsult11-May-14 5:56
mvePIEBALDconsult11-May-14 5:56 
AnswerRe: how to return primary key when insert statement violates unique constraint Pin
jschell11-May-14 8:17
jschell11-May-14 8:17 
GeneralRe: how to return primary key when insert statement violates unique constraint Pin
Nico Haegens12-May-14 3:20
professionalNico Haegens12-May-14 3:20 
GeneralRe: how to return primary key when insert statement violates unique constraint Pin
Richard.Berry10012-May-14 7:55
Richard.Berry10012-May-14 7:55 
GeneralRe: how to return primary key when insert statement violates unique constraint Pin
Eddy Vluggen12-May-14 8:49
professionalEddy Vluggen12-May-14 8:49 
GeneralRe: how to return primary key when insert statement violates unique constraint Pin
Corporal Agarn12-May-14 9:45
professionalCorporal Agarn12-May-14 9:45 
GeneralRe: how to return primary key when insert statement violates unique constraint Pin
jschell12-May-14 10:31
jschell12-May-14 10:31 
Nico Haegens wrote:
Person A comes along to one of my client's employees and gives his info and a certain address.

Person B comes along to another one of my client's employees, gives his info and the same address as person A.

here is what currently happens in my app:


What you have described is a hypothetical implementation scenario.

However what is the exact business case where this happens? Not what might happen but what does the actual people of this company using the application do?

Nico Haegens wrote:
Problem is,


You don't have a problem until there is a business case.

For example given your description a 'customer' could in fact have the very same address as a different 'customer' and your current implementation would prevent you from entering it (regardless of why.) That can happen because a person might be legally incorporated as different companies yet work out of the same office (one person after all.) But as a legal entity the address in not in fact the 'same' despite being the same physical location.
AnswerRe: how to return primary key when insert statement violates unique constraint Pin
Mycroft Holmes12-May-14 22:25
professionalMycroft Holmes12-May-14 22:25 
AnswerRe: how to return primary key when insert statement violates unique constraint Pin
Nico Haegens13-May-14 2:18
professionalNico Haegens13-May-14 2:18 
GeneralRe: how to return primary key when insert statement violates unique constraint Pin
Mycroft Holmes13-May-14 12:52
professionalMycroft Holmes13-May-14 12:52 
QuestionDatabase SQL Pin
Syafiqah Zahirah10-May-14 4:47
Syafiqah Zahirah10-May-14 4:47 
AnswerRe: Database SQL Pin
Peter Leow10-May-14 5:24
professionalPeter Leow10-May-14 5:24 
GeneralRe: Database SQL Pin
Syafiqah Zahirah11-May-14 3:43
Syafiqah Zahirah11-May-14 3:43 
AnswerRe: Database SQL Pin
Peter Leow11-May-14 4:13
professionalPeter Leow11-May-14 4:13 
GeneralRe: Database SQL Pin
Syafiqah Zahirah11-May-14 4:45
Syafiqah Zahirah11-May-14 4:45 
GeneralRe: Database SQL Pin
Syafiqah Zahirah15-May-14 6:50
Syafiqah Zahirah15-May-14 6:50 
GeneralRe: Database SQL Pin
Peter Leow15-May-14 14:47
professionalPeter Leow15-May-14 14:47 
QuestionArithmetic rounding Pin
Richard.Berry1009-May-14 11:04
Richard.Berry1009-May-14 11:04 
AnswerRe: Arithmetic rounding Pin
Richard Andrew x649-May-14 12:26
professionalRichard Andrew x649-May-14 12:26 
GeneralRe: Arithmetic rounding Pin
Richard.Berry1009-May-14 20:58
Richard.Berry1009-May-14 20:58 
AnswerRe: Arithmetic rounding Pin
Andrius Leonavicius9-May-14 15:02
professionalAndrius Leonavicius9-May-14 15:02 
GeneralRe: Arithmetic rounding Pin
Richard.Berry1009-May-14 20:45
Richard.Berry1009-May-14 20:45 
GeneralRe: Arithmetic rounding Pin
Andrius Leonavicius10-May-14 4:28
professionalAndrius Leonavicius10-May-14 4:28 
QuestionFetch records efficiently Pin
avi_dadi20029-May-14 9:15
avi_dadi20029-May-14 9:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.