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.
Author |
Topic |
glenharvy
Starting Member
5 Posts |
Posted - 2007-05-28 : 09:03:40
|
Hi,The following works in SQL 2005 but NOT SQL 2005 Compact Edition:IF EXISTS (SELECT ID FROM Court2 WHERE BookingDate = '2007-05-28')UPDATE Court2 SET T1100 = 52 WHERE (BookingDate = '2007-05-28')ELSEINSERT INTO Court2 (BookingDate,T1100) VALUES ('2007-05-28',52)In CE I get the following error:There was an error parsing the query. [ Token line number = 1,Token line offset = 1,Token in error = IF ]I can't find where the problem is - can someone help.Thanks, |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-05-28 : 09:10:57
|
Is this the first statement in the SP/Script or there are some statements before IF EXISTS() as well? If yes, then post them too.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-05-28 : 09:17:14
|
Is IF ... ELSE supported in SQL 2005 CE ? KH |
|
|
glenharvy
Starting Member
5 Posts |
Posted - 2007-05-28 : 09:20:08
|
There is nothing else - I'm actually running the statement in SQL Management Studio. |
|
|
glenharvy
Starting Member
5 Posts |
Posted - 2007-05-28 : 09:49:02
|
quote: Originally posted by khtan Is IF ... ELSE supported in SQL 2005 CE ? KH
Is IF ... ELSE called scripting?If so then I don't think its supported |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-05-28 : 09:51:23
|
As far as i know it is not supported in SQL Server CE 2.0 so don't think it will be supported in 2005 Compact Edition also. KH |
|
|
|
|
|