Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error MSG 102

Status
Not open for further replies.

Halliarse

IS-IT--Management
Jan 8, 2007
213
0
0
GB
Hi

I'm using SQL 2005 and I'm parsing a script which contains the following line:-

Insert Into Detail ( Defendant_No, Client_ID, Company_ID, Account_No, Creditor_Reference, Original_Balance, Current_Balance, Interest_Rate, Date_of_Last_NOD, Date_of_Termination, Goods1, Good2, Serial_Number, Agreement_Date ) values ( 227896,'ARW001','MCS001','37866','4129850863452625',4891.23,4891.23,,,29/06/2006,'','','',26/05/2004)

It is returning the following error and I cannot determine why! Any assistance would be greatly appreciated!

Msg 102, Level 15, State 1, Line 2
Incorrect syntax near ','.

Many thanks

Steve
 
I've just tried that and it returns the same error! Any other ideas please?

Cheers
 
So what do you have now? Also, depending on your data types you might have to wrap quotes around your number fields. You should also pass your dates through in ANSI format (e.g. YYYYMMDD).


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
4891.23,,,29/06/2006

would be better as
4891.23,null,null,29/06/2006
 
Hoogie

The inclusion of 'null' did the trick...many, many thanks!

Regards

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top