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
 Near "-": syntax error - help

Author  Topic 

Lando88
Starting Member

5 Posts

Posted - 2013-02-04 : 17:50:54
I'm new to sql and have achieved simple table upates before but with this one I keep running into trouble. Please ignore the data format it is accurate, just the syntax hang up for whatever reason.

All variotions of wrapping the data come up with 'near "-": syntax error', I am using SQLiteSpy to modify the database in question.

Any advice very welcome.


UPDATE EventTable
SET Date='D.+19110402..+00000000..' , SortDate='6705438749380050956'
WHERE Date='D.+19110000..+00000000..' AND EventType='18';

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2013-02-04 : 18:22:21
Try square brackets around Date as that's a reserved word.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Lando88
Starting Member

5 Posts

Posted - 2013-02-04 : 18:27:59
Was very excited, tried it and still the same result )-:
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2013-02-04 : 18:36:33
Sorry, I'm not spotting anything wrong from a T-SQL perspective. Have no idea what SQLiteSpy is. You might want to post your question on a site that specializes in that technology. We specialize in Microsoft SQL Server here.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Lando88
Starting Member

5 Posts

Posted - 2013-02-05 : 04:27:15
Thank you for your help, I will do as you suggested.
Go to Top of Page
   

- Advertisement -