SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Near "-": syntax error - help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Lando88
Starting Member

5 Posts

Posted - 02/04/2013 :  17:50:54  Show Profile  Reply with Quote
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

USA
35953 Posts

Posted - 02/04/2013 :  18:22:21  Show Profile  Visit tkizer's Homepage  Reply with Quote
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 - 02/04/2013 :  18:27:59  Show Profile  Reply with Quote
Was very excited, tried it and still the same result )-:
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
35953 Posts

Posted - 02/04/2013 :  18:36:33  Show Profile  Visit tkizer's Homepage  Reply with Quote
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 - 02/05/2013 :  04:27:15  Show Profile  Reply with Quote
Thank you for your help, I will do as you suggested.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000