Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Syntax error

Author  Topic 

Tails
Starting Member

1 Post

Posted - 2009-12-13 : 21:56:51
Hi, I'm trying to add a statement to a program to add a list of variables from an excel file, it gives me a syntax error, but i cant figure out what i'm doing wrong... i'm pretty useless when it comes to using SQL, so any help would be much appreciated. I know it can find the spreadsheet, the sheet and fields, when i changed the name of the sheet, it the error was that it couldnt find it... so, this is the statement i'm using:


SELECT
REPLACE('https://my.optus.com.au/store/SvcCustomerCtrl.do<formvariables><ctrl id=|state| value=|RetrieveCustDetails| /><ctrl id=|custSearch| value=|ExtID| /><ctrl id=|inbound| value=|false| /><ctrl id=|areaCd| value=|03| /><ctrl id=|identifierLAU| value=|| /><ctrl id=|identifierMob| value=|'
+ _LISTS
+ '| /><ctrl id=|identifierUDSL| value=|| /><ctrl id=|acctIdentifierFLRAreaCd| value=|02| /><ctrl id=|acctIdentifierFLRNumber| value=|| /><ctrl id=|acctIdentifierSLSAreaCd| value=|02| /><ctrl id=|acctIdentifierSLSNumber| value=|| /></formvariables>', '|', '''')
FROM _LEADS


and this is the error it is giving me:


Syntax error in query expression REPLACE( https://my.optus.com.au/store/SvcCustomerCtrl.do<formvariables><ctrl id=|state| value=|RetrieveCustDetails| /><ctrl id=|custSearch| value=|ExtID| /><ctrl id=|inbound| value=|false| /><ctrl id=|areaCd| value=|03| /><ctrl id=|identifierLAU| value=| .


Any help at all would be great, i'm looking forward to finally finishing this task.

Tails

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-12-13 : 22:24:30
are you using SQL Server ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -