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 |
|
Rammi
Starting Member
19 Posts |
Posted - 2007-12-19 : 01:52:56
|
| Following query returns error when used on different servers.Query:Select sourceid fromOPENDATASOURCE('SQLOLEDB', 'DATA SOURCE=main;USER ID=user;PASSWORD=user').SOURCE.DBO.sourceprofileintersectselect mip_source_id from OPENDATASOURCE('SQLOLEDB', 'DATA SOURCE=source;USER ID=user;PASSWORD=user').Source.DBO.sourcesError:Msg 156, Level 15, State 1, Line 5Incorrect syntax near the keyword 'intersect'. |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-12-19 : 02:58:41
|
| Check the compatibility level of your database.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-12-19 : 03:18:59
|
And make sure you have enabled "ad hoc queries" in Surface Area Configuration. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
Rammi
Starting Member
19 Posts |
Posted - 2007-12-19 : 05:10:21
|
ad hoc queries are enabledquote: Originally posted by Peso And make sure you have enabled "ad hoc queries" in Surface Area Configuration. E 12°55'05.25"N 56°04'39.16"
|
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-12-19 : 05:47:33
|
And the answer to Harsh's question? E 12°55'05.25"N 56°04'39.16" |
 |
|
|
Rammi
Starting Member
19 Posts |
Posted - 2007-12-19 : 23:02:06
|
| compatibility level is 80 for my databases |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-12-20 : 03:03:08
|
| That's the reason you get error. Your server is set to be compatible with SQL Server 2000 which does not support INTERSECT and EXCEPT.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|
|