Click here to Skip to main content
15,902,114 members
Home / Discussions / Database
   

Database

 
AnswerRe: Complex SQL Query for Inventory. Need Help Pin
King Fisher30-Jan-14 2:12
professionalKing Fisher30-Jan-14 2:12 
SuggestionRe: Complex SQL Query for Inventory. Need Help Pin
Richard Deeming30-Jan-14 2:24
mveRichard Deeming30-Jan-14 2:24 
Questiondatabase projects Pin
dexter.nmn29-Jan-14 1:12
dexter.nmn29-Jan-14 1:12 
AnswerRe: database projects Pin
Mycroft Holmes29-Jan-14 17:33
professionalMycroft Holmes29-Jan-14 17:33 
QuestionOptimizing a query Pin
mrkeivan28-Jan-14 19:37
mrkeivan28-Jan-14 19:37 
AnswerRe: Optimizing a query Pin
Jörgen Andersson29-Jan-14 1:44
professionalJörgen Andersson29-Jan-14 1:44 
QuestionWould an index make this query faster? Pin
khun_panya27-Jan-14 18:42
khun_panya27-Jan-14 18:42 
AnswerRe: Would an index make this query faster? Pin
Mycroft Holmes27-Jan-14 21:00
professionalMycroft Holmes27-Jan-14 21:00 
AnswerRe: Would an index make this query faster? Pin
Shameel27-Jan-14 22:43
professionalShameel27-Jan-14 22:43 
GeneralRe: Would an index make this query faster? Pin
khun_panya29-Jan-14 6:23
khun_panya29-Jan-14 6:23 
AnswerRe: Would an index make this query faster? Pin
GuyThiebaut28-Jan-14 3:32
professionalGuyThiebaut28-Jan-14 3:32 
GeneralRe: Would an index make this query faster? Pin
Jörgen Andersson28-Jan-14 9:11
professionalJörgen Andersson28-Jan-14 9:11 
QuestionAnalyser index recommendations Pin
vkEE27-Jan-14 8:32
vkEE27-Jan-14 8:32 
AnswerRe: Analyser index recommendations Pin
Mycroft Holmes27-Jan-14 12:04
professionalMycroft Holmes27-Jan-14 12:04 
AnswerRe: Analyser index recommendations Pin
Shameel27-Jan-14 22:31
professionalShameel27-Jan-14 22:31 
QuestionConditional SQL commands: Good? Bad? Pin
Gregory Gadow27-Jan-14 5:10
Gregory Gadow27-Jan-14 5:10 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Richard Deeming27-Jan-14 5:21
mveRichard Deeming27-Jan-14 5:21 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Eddy Vluggen28-Jan-14 3:21
professionalEddy Vluggen28-Jan-14 3:21 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Jörgen Andersson27-Jan-14 5:29
professionalJörgen Andersson27-Jan-14 5:29 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Kornfeld Eliyahu Peter27-Jan-14 8:07
professionalKornfeld Eliyahu Peter27-Jan-14 8:07 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Gregory Gadow27-Jan-14 10:03
Gregory Gadow27-Jan-14 10:03 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Mycroft Holmes27-Jan-14 12:00
professionalMycroft Holmes27-Jan-14 12:00 
I don't like the rowcount method as is uses 2 writes to the database. Have not used the Merge function so I have no opinion.

I use convention instead, EVERY tale has an identity field as the primary key, so when I pass in the object (via variables) the ID field has either 0 or the record value. I then use IF to test the ID and either insert or update the record.

I put it into a tip [^].

While it is not guaranteed to be perfect it has been working for me for decades! 99% of database our work goes through stored procedure. String queries are heavily discouraged.
Never underestimate the power of human stupidity
RAH

GeneralRe: Conditional SQL commands: Good? Bad? Pin
Kornfeld Eliyahu Peter27-Jan-14 20:45
professionalKornfeld Eliyahu Peter27-Jan-14 20:45 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Mycroft Holmes27-Jan-14 20:57
professionalMycroft Holmes27-Jan-14 20:57 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Kornfeld Eliyahu Peter27-Jan-14 21:02
professionalKornfeld Eliyahu Peter27-Jan-14 21:02 

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.