Click here to Skip to main content
15,925,782 members
Home / Discussions / Database
   

Database

 
AnswerRe: Distinct records problem Pin
ra ra ra ra3-Aug-06 0:58
ra ra ra ra3-Aug-06 0:58 
GeneralRe: Distinct records problem Pin
psamy3-Aug-06 1:03
psamy3-Aug-06 1:03 
GeneralRe: Distinct records problem Pin
ra ra ra ra3-Aug-06 1:06
ra ra ra ra3-Aug-06 1:06 
GeneralRe: Distinct records problem Pin
seea3-Aug-06 5:41
seea3-Aug-06 5:41 
QuestionSQL Server not running in local Pin
Exelioindia2-Aug-06 19:53
Exelioindia2-Aug-06 19:53 
AnswerRe: SQL Server not running in local Pin
seea3-Aug-06 0:38
seea3-Aug-06 0:38 
QuestionCheckbox in datagrid [modified] Pin
ypsyong2-Aug-06 16:52
ypsyong2-Aug-06 16:52 
QuestionIncorrect syntax, but I can't see it [modified] Pin
Ed.Poore2-Aug-06 2:32
Ed.Poore2-Aug-06 2:32 
Can anyone tell me what's wrong with this statement (purpose is to update a row if it exists and create it if it doesn't (but that should be obvious)).

IF EXISTS(SELECT * FROM Assemblers WHERE ID = @id)
  BEGIN
    UPDATE Assemblers SET Name = @name WHERE ID = @id
  END
ELSE
  BEGIN
    INSERT INTO (ID, Name) VALUES (@id, @name)
  END


Error is: Incorrect syntax near '('.
Note: I tried writing this on my own, couldn't get it accepted and did a search and someone had posted this code (except for the differing table structures and names) on one of the MSDN forums.


-- modified at 8:39 Wednesday 2nd August, 2006


Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

Ed

AnswerRe: Incorrect syntax, but I can't see it Pin
ToddHileHoffer2-Aug-06 3:14
ToddHileHoffer2-Aug-06 3:14 
GeneralRe: Incorrect syntax, but I can't see it Pin
Ed.Poore2-Aug-06 3:35
Ed.Poore2-Aug-06 3:35 
GeneralRe: Incorrect syntax, but I can't see it Pin
Kevin McFarlane2-Aug-06 3:45
Kevin McFarlane2-Aug-06 3:45 
QuestionDifference between SQL2000 and SQL2005 Pin
divyaswati2-Aug-06 1:44
divyaswati2-Aug-06 1:44 
AnswerRe: Difference between SQL2000 and SQL2005 Pin
Duncan Edwards Jones2-Aug-06 2:05
professionalDuncan Edwards Jones2-Aug-06 2:05 
GeneralRe: Difference between SQL2000 and SQL2005 Pin
Frank Kerrigan2-Aug-06 2:16
Frank Kerrigan2-Aug-06 2:16 
AnswerRe: Difference between SQL2000 and SQL2005 Pin
Kevin McFarlane2-Aug-06 3:44
Kevin McFarlane2-Aug-06 3:44 
AnswerRe: I need an suggestion ............................ Pin
WillemM3-Aug-06 3:37
WillemM3-Aug-06 3:37 
QuestionProbelm while Filtering DateTime Pin
indiaone2-Aug-06 0:37
indiaone2-Aug-06 0:37 
AnswerRe: problem in getting datetime value Pin
Colin Angus Mackay2-Aug-06 0:46
Colin Angus Mackay2-Aug-06 0:46 
Questionado.net Table Pin
srkt1-Aug-06 21:14
srkt1-Aug-06 21:14 
AnswerRe: ado.net Table Pin
Colin Angus Mackay1-Aug-06 23:02
Colin Angus Mackay1-Aug-06 23:02 
Questiondatabase question Pin
skyeddie1-Aug-06 20:26
skyeddie1-Aug-06 20:26 
AnswerRe: database question Pin
Colin Angus Mackay1-Aug-06 23:04
Colin Angus Mackay1-Aug-06 23:04 
QuestionAdding Row to Access database table Pin
dsovino1-Aug-06 6:44
dsovino1-Aug-06 6:44 
AnswerRe: Adding Row to Access database table Pin
Stephen McGuire2-Aug-06 11:11
Stephen McGuire2-Aug-06 11:11 
GeneralRe: Adding Row to Access database table Pin
dsovino3-Aug-06 12:41
dsovino3-Aug-06 12:41 

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.