Showing posts with label keyword. Show all posts
Showing posts with label keyword. Show all posts

Monday, March 26, 2012

EXEC keyword

I am in the process of importing an Oracle database into SQL Server.
Once of the tables has a field called "EXEC".
SQL Server seems to reject any queries that include that particular
field because EXEC is a keyword. For eg.
SELECT ID, EXEC from USERS
results in a syntax error near keyword EXEC.
I can't change the fieldname becuase it will require reworking of a
whole bunch of scripts.
What can I do to adjust the query?
Bijoy
You can use square brackets as delimiters:
select [EXEC] from ...
See "Delimited Identifiers" and "Using Identifiers" in Books Online for
more information.
Simon
|||Try
SELECT [ID], [EXEC] FROM Users
Regards
Steen
b_naick@.yahoo.ca wrote:
> I am in the process of importing an Oracle database into SQL Server.
> Once of the tables has a field called "EXEC".
> SQL Server seems to reject any queries that include that particular
> field because EXEC is a keyword. For eg.
> SELECT ID, EXEC from USERS
> results in a syntax error near keyword EXEC.
> I can't change the fieldname becuase it will require reworking of a
> whole bunch of scripts.
> What can I do to adjust the query?
> Bijoy
|||(b_naick@.yahoo.ca) writes:
> I am in the process of importing an Oracle database into SQL Server.
> Once of the tables has a field called "EXEC".
> SQL Server seems to reject any queries that include that particular
> field because EXEC is a keyword. For eg.
> SELECT ID, EXEC from USERS
> results in a syntax error near keyword EXEC.
> I can't change the fieldname becuase it will require reworking of a
> whole bunch of scripts.
> What can I do to adjust the query?
Rather than using [] as suggested in other posts, "" may be better.
SELECT ID, "EXEC" FROM USERS
[] is usually preferred on SQL Server. However, that is proprietary syntax,
whereas quoting with "" is ANSI-compliant, and may thus work on Oracle as
well.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
sql

EXEC keyword

I am in the process of importing an Oracle database into SQL Server.
Once of the tables has a field called "EXEC".
SQL Server seems to reject any queries that include that particular
field because EXEC is a keyword. For eg.
SELECT ID, EXEC from USERS
results in a syntax error near keyword EXEC.
I can't change the fieldname becuase it will require reworking of a
whole bunch of scripts.
What can I do to adjust the query?
BijoyYou can use square brackets as delimiters:
select [EXEC] from ...
See "Delimited Identifiers" and "Using Identifiers" in Books Online for
more information.
Simon|||Try
SELECT [ID], [EXEC] FROM Users
Regards
Steen
b_naick@.yahoo.ca wrote:
> I am in the process of importing an Oracle database into SQL Server.
> Once of the tables has a field called "EXEC".
> SQL Server seems to reject any queries that include that particular
> field because EXEC is a keyword. For eg.
> SELECT ID, EXEC from USERS
> results in a syntax error near keyword EXEC.
> I can't change the fieldname becuase it will require reworking of a
> whole bunch of scripts.
> What can I do to adjust the query?
> Bijoy|||(b_naick@.yahoo.ca) writes:
> I am in the process of importing an Oracle database into SQL Server.
> Once of the tables has a field called "EXEC".
> SQL Server seems to reject any queries that include that particular
> field because EXEC is a keyword. For eg.
> SELECT ID, EXEC from USERS
> results in a syntax error near keyword EXEC.
> I can't change the fieldname becuase it will require reworking of a
> whole bunch of scripts.
> What can I do to adjust the query?
Rather than using [] as suggested in other posts, "" may be better.
SELECT ID, "EXEC" FROM USERS
[] is usually preferred on SQL Server. However, that is proprietary synt
ax,
whereas quoting with "" is ANSI-compliant, and may thus work on Oracle as
well.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

EXEC keyword

I am in the process of importing an Oracle database into SQL Server.
Once of the tables has a field called "EXEC".
SQL Server seems to reject any queries that include that particular
field because EXEC is a keyword. For eg.
SELECT ID, EXEC from USERS
results in a syntax error near keyword EXEC.
I can't change the fieldname becuase it will require reworking of a
whole bunch of scripts.
What can I do to adjust the query?
BijoyYou can use square brackets as delimiters:
select [EXEC] from ...
See "Delimited Identifiers" and "Using Identifiers" in Books Online for
more information.
Simon|||Try
SELECT [ID], [EXEC] FROM Users
Regards
Steen
b_naick@.yahoo.ca wrote:
> I am in the process of importing an Oracle database into SQL Server.
> Once of the tables has a field called "EXEC".
> SQL Server seems to reject any queries that include that particular
> field because EXEC is a keyword. For eg.
> SELECT ID, EXEC from USERS
> results in a syntax error near keyword EXEC.
> I can't change the fieldname becuase it will require reworking of a
> whole bunch of scripts.
> What can I do to adjust the query?
> Bijoy|||(b_naick@.yahoo.ca) writes:
> I am in the process of importing an Oracle database into SQL Server.
> Once of the tables has a field called "EXEC".
> SQL Server seems to reject any queries that include that particular
> field because EXEC is a keyword. For eg.
> SELECT ID, EXEC from USERS
> results in a syntax error near keyword EXEC.
> I can't change the fieldname becuase it will require reworking of a
> whole bunch of scripts.
> What can I do to adjust the query?
Rather than using [] as suggested in other posts, "" may be better.
SELECT ID, "EXEC" FROM USERS
[] is usually preferred on SQL Server. However, that is proprietary syntax,
whereas quoting with "" is ANSI-compliant, and may thus work on Oracle as
well.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

EXEC keyword

I am in the process of importing an Oracle database into SQL Server.
Once of the tables has a field called "EXEC".

SQL Server seems to reject any queries that include that particular
field because EXEC is a keyword. For eg.

SELECT ID, EXEC from USERS

results in a syntax error near keyword EXEC.

I can't change the fieldname becuase it will require reworking of a
whole bunch of scripts.

What can I do to adjust the query?

BijoyYou can use square brackets as delimiters:

select [EXEC] from ...

See "Delimited Identifiers" and "Using Identifiers" in Books Online for
more information.

Simon|||Try

SELECT [ID], [EXEC] FROM Users

Regards
Steen

b_naick@.yahoo.ca wrote:
> I am in the process of importing an Oracle database into SQL Server.
> Once of the tables has a field called "EXEC".
> SQL Server seems to reject any queries that include that particular
> field because EXEC is a keyword. For eg.
> SELECT ID, EXEC from USERS
> results in a syntax error near keyword EXEC.
> I can't change the fieldname becuase it will require reworking of a
> whole bunch of scripts.
> What can I do to adjust the query?
> Bijoy|||(b_naick@.yahoo.ca) writes:
> I am in the process of importing an Oracle database into SQL Server.
> Once of the tables has a field called "EXEC".
> SQL Server seems to reject any queries that include that particular
> field because EXEC is a keyword. For eg.
> SELECT ID, EXEC from USERS
> results in a syntax error near keyword EXEC.
> I can't change the fieldname becuase it will require reworking of a
> whole bunch of scripts.
> What can I do to adjust the query?

Rather than using [] as suggested in other posts, "" may be better.

SELECT ID, "EXEC" FROM USERS

[] is usually preferred on SQL Server. However, that is proprietary syntax,
whereas quoting with "" is ANSI-compliant, and may thus work on Oracle as
well.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Friday, February 24, 2012

except keyword

hi,
how do i use except with my result sets.
any example please.
kalaivanan
Have you read this article in the BOL
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/b1019300-171a-4a1a-854f-e1e751de3565.htm
"kalaivanan" <mail2kalai@.gmail.com> wrote in message
news:1163672142.199427.132050@.m73g2000cwd.googlegr oups.com...
> hi,
> how do i use except with my result sets.
> any example please.
> kalaivanan
>
|||the link did not works.
may i have the link once again please.
kalaivanan
Uri Dimant wrote:[vbcol=seagreen]
> Have you read this article in the BOL
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/b1019300-171a-4a1a-854f-e1e751de3565.htm
>
> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> news:1163672142.199427.132050@.m73g2000cwd.googlegr oups.com...
|||Open BOL and click on search tab. Type "except" and click ok
"kalaivanan" <mail2kalai@.gmail.com> wrote in message
news:1163673132.167142.306460@.m7g2000cwm.googlegro ups.com...
> the link did not works.
> may i have the link once again please.
> kalaivanan
> Uri Dimant wrote:
>
|||hi,
i get the following error while trying
USE Northwind
SELECT City, Region FROM customers
EXCEPT
SELECT City, Region FROM Employees
error:
Server: Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'EXCEPT'.
Tibor Karaszi wrote:[vbcol=seagreen]
> --All city-region combination that exists
> --in customers except those that also exists in employees
> USE Northwind
> SELECT City, Region FROM customers
> EXCEPT
> SELECT City, Region FROM Employees
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> news:1163672142.199427.132050@.m73g2000cwd.googlegr oups.com...
|||i am using sql server 2000.
kalaivanan
Tibor Karaszi wrote:[vbcol=seagreen]
> What version of SQL Server? What compatibility level for the database? EXCEPT is new for 2005 and it
> needs compat level 90.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> news:1163742581.350491.211280@.e3g2000cwe.googlegro ups.com...
|||okay.
i have completed the job using left join.
kalaivanan
Tibor Karaszi wrote:[vbcol=seagreen]
> EXCEPT isn't available on 2000. It was introduced in 2005.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> news:1163760282.349339.48870@.k70g2000cwa.googlegro ups.com...

except keyword

hi,
how do i use except with my result sets.
any example please.
kalaivananHave you read this article in the BOL
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/b1019300-171a-4a1a-854f-e1e751de3565.htm
"kalaivanan" <mail2kalai@.gmail.com> wrote in message
news:1163672142.199427.132050@.m73g2000cwd.googlegroups.com...
> hi,
> how do i use except with my result sets.
> any example please.
> kalaivanan
>|||the link did not works.
may i have the link once again please.
kalaivanan
Uri Dimant wrote:
> Have you read this article in the BOL
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/b1019300-171a-4a1a-854f-e1e751de3565.htm
>
> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> news:1163672142.199427.132050@.m73g2000cwd.googlegroups.com...
> > hi,
> > how do i use except with my result sets.
> > any example please.
> >
> > kalaivanan
> >|||Open BOL and click on search tab. Type "except" and click ok
"kalaivanan" <mail2kalai@.gmail.com> wrote in message
news:1163673132.167142.306460@.m7g2000cwm.googlegroups.com...
> the link did not works.
> may i have the link once again please.
> kalaivanan
> Uri Dimant wrote:
>> Have you read this article in the BOL
>> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/b1019300-171a-4a1a-854f-e1e751de3565.htm
>>
>> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
>> news:1163672142.199427.132050@.m73g2000cwd.googlegroups.com...
>> > hi,
>> > how do i use except with my result sets.
>> > any example please.
>> >
>> > kalaivanan
>> >
>|||--All city-region combination that exists
--in customers except those that also exists in employees
USE Northwind
SELECT City, Region FROM customers
EXCEPT
SELECT City, Region FROM Employees
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"kalaivanan" <mail2kalai@.gmail.com> wrote in message
news:1163672142.199427.132050@.m73g2000cwd.googlegroups.com...
> hi,
> how do i use except with my result sets.
> any example please.
> kalaivanan
>|||hi,
i get the following error while trying
USE Northwind
SELECT City, Region FROM customers
EXCEPT
SELECT City, Region FROM Employees
error:
Server: Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'EXCEPT'.
Tibor Karaszi wrote:
> --All city-region combination that exists
> --in customers except those that also exists in employees
> USE Northwind
> SELECT City, Region FROM customers
> EXCEPT
> SELECT City, Region FROM Employees
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> news:1163672142.199427.132050@.m73g2000cwd.googlegroups.com...
> > hi,
> > how do i use except with my result sets.
> > any example please.
> >
> > kalaivanan
> >|||What version of SQL Server? What compatibility level for the database? EXCEPT is new for 2005 and it
needs compat level 90.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"kalaivanan" <mail2kalai@.gmail.com> wrote in message
news:1163742581.350491.211280@.e3g2000cwe.googlegroups.com...
> hi,
> i get the following error while trying
> USE Northwind
> SELECT City, Region FROM customers
> EXCEPT
> SELECT City, Region FROM Employees
> error:
> Server: Msg 156, Level 15, State 1, Line 2
> Incorrect syntax near the keyword 'EXCEPT'.
> Tibor Karaszi wrote:
>> --All city-region combination that exists
>> --in customers except those that also exists in employees
>> USE Northwind
>> SELECT City, Region FROM customers
>> EXCEPT
>> SELECT City, Region FROM Employees
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
>> news:1163672142.199427.132050@.m73g2000cwd.googlegroups.com...
>> > hi,
>> > how do i use except with my result sets.
>> > any example please.
>> >
>> > kalaivanan
>> >
>|||i am using sql server 2000.
kalaivanan
Tibor Karaszi wrote:
> What version of SQL Server? What compatibility level for the database? EXCEPT is new for 2005 and it
> needs compat level 90.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> news:1163742581.350491.211280@.e3g2000cwe.googlegroups.com...
> > hi,
> >
> > i get the following error while trying
> >
> > USE Northwind
> > SELECT City, Region FROM customers
> > EXCEPT
> > SELECT City, Region FROM Employees
> >
> > error:
> >
> > Server: Msg 156, Level 15, State 1, Line 2
> > Incorrect syntax near the keyword 'EXCEPT'.
> >
> > Tibor Karaszi wrote:
> >> --All city-region combination that exists
> >>
> >> --in customers except those that also exists in employees
> >>
> >> USE Northwind
> >>
> >> SELECT City, Region FROM customers
> >>
> >> EXCEPT
> >>
> >> SELECT City, Region FROM Employees
> >>
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> >> news:1163672142.199427.132050@.m73g2000cwd.googlegroups.com...
> >> > hi,
> >> > how do i use except with my result sets.
> >> > any example please.
> >> >
> >> > kalaivanan
> >> >
> >|||EXCEPT isn't available on 2000. It was introduced in 2005.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"kalaivanan" <mail2kalai@.gmail.com> wrote in message
news:1163760282.349339.48870@.k70g2000cwa.googlegroups.com...
>i am using sql server 2000.
> kalaivanan
> Tibor Karaszi wrote:
>> What version of SQL Server? What compatibility level for the database? EXCEPT is new for 2005 and
>> it
>> needs compat level 90.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
>> news:1163742581.350491.211280@.e3g2000cwe.googlegroups.com...
>> > hi,
>> >
>> > i get the following error while trying
>> >
>> > USE Northwind
>> > SELECT City, Region FROM customers
>> > EXCEPT
>> > SELECT City, Region FROM Employees
>> >
>> > error:
>> >
>> > Server: Msg 156, Level 15, State 1, Line 2
>> > Incorrect syntax near the keyword 'EXCEPT'.
>> >
>> > Tibor Karaszi wrote:
>> >> --All city-region combination that exists
>> >>
>> >> --in customers except those that also exists in employees
>> >>
>> >> USE Northwind
>> >>
>> >> SELECT City, Region FROM customers
>> >>
>> >> EXCEPT
>> >>
>> >> SELECT City, Region FROM Employees
>> >>
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
>> >> news:1163672142.199427.132050@.m73g2000cwd.googlegroups.com...
>> >> > hi,
>> >> > how do i use except with my result sets.
>> >> > any example please.
>> >> >
>> >> > kalaivanan
>> >> >
>> >
>|||okay.
i have completed the job using left join.
kalaivanan
Tibor Karaszi wrote:
> EXCEPT isn't available on 2000. It was introduced in 2005.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> news:1163760282.349339.48870@.k70g2000cwa.googlegroups.com...
> >i am using sql server 2000.
> >
> > kalaivanan
> >
> > Tibor Karaszi wrote:
> >> What version of SQL Server? What compatibility level for the database? EXCEPT is new for 2005 and
> >> it
> >> needs compat level 90.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> >> news:1163742581.350491.211280@.e3g2000cwe.googlegroups.com...
> >> > hi,
> >> >
> >> > i get the following error while trying
> >> >
> >> > USE Northwind
> >> > SELECT City, Region FROM customers
> >> > EXCEPT
> >> > SELECT City, Region FROM Employees
> >> >
> >> > error:
> >> >
> >> > Server: Msg 156, Level 15, State 1, Line 2
> >> > Incorrect syntax near the keyword 'EXCEPT'.
> >> >
> >> > Tibor Karaszi wrote:
> >> >> --All city-region combination that exists
> >> >>
> >> >> --in customers except those that also exists in employees
> >> >>
> >> >> USE Northwind
> >> >>
> >> >> SELECT City, Region FROM customers
> >> >>
> >> >> EXCEPT
> >> >>
> >> >> SELECT City, Region FROM Employees
> >> >>
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> >> >> news:1163672142.199427.132050@.m73g2000cwd.googlegroups.com...
> >> >> > hi,
> >> >> > how do i use except with my result sets.
> >> >> > any example please.
> >> >> >
> >> >> > kalaivanan
> >> >> >
> >> >
> >

except keyword

hi,
how do i use except with my result sets.
any example please.
kalaivananHave you read this article in the BOL
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/b1019300-171a-4a1a-854f-
e1e751de3565.htm
"kalaivanan" <mail2kalai@.gmail.com> wrote in message
news:1163672142.199427.132050@.m73g2000cwd.googlegroups.com...
> hi,
> how do i use except with my result sets.
> any example please.
> kalaivanan
>|||the link did not works.
may i have the link once again please.
kalaivanan
Uri Dimant wrote:[vbcol=seagreen]
> Have you read this article in the BOL
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/b1019300-171a-4a1a-854
f-e1e751de3565.htm
>
> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> news:1163672142.199427.132050@.m73g2000cwd.googlegroups.com...|||Open BOL and click on search tab. Type "except" and click ok
"kalaivanan" <mail2kalai@.gmail.com> wrote in message
news:1163673132.167142.306460@.m7g2000cwm.googlegroups.com...
> the link did not works.
> may i have the link once again please.
> kalaivanan
> Uri Dimant wrote:
>|||--All city-region combination that exists
--in customers except those that also exists in employees
USE Northwind
SELECT City, Region FROM customers
EXCEPT
SELECT City, Region FROM Employees
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"kalaivanan" <mail2kalai@.gmail.com> wrote in message
news:1163672142.199427.132050@.m73g2000cwd.googlegroups.com...
> hi,
> how do i use except with my result sets.
> any example please.
> kalaivanan
>|||hi,
i get the following error while trying
USE Northwind
SELECT City, Region FROM customers
EXCEPT
SELECT City, Region FROM Employees
error:
Server: Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'EXCEPT'.
Tibor Karaszi wrote:[vbcol=seagreen]
> --All city-region combination that exists
> --in customers except those that also exists in employees
> USE Northwind
> SELECT City, Region FROM customers
> EXCEPT
> SELECT City, Region FROM Employees
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> news:1163672142.199427.132050@.m73g2000cwd.googlegroups.com...|||What version of SQL Server? What compatibility level for the database? EXCEP
T is new for 2005 and it
needs compat level 90.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"kalaivanan" <mail2kalai@.gmail.com> wrote in message
news:1163742581.350491.211280@.e3g2000cwe.googlegroups.com...
> hi,
> i get the following error while trying
> USE Northwind
> SELECT City, Region FROM customers
> EXCEPT
> SELECT City, Region FROM Employees
> error:
> Server: Msg 156, Level 15, State 1, Line 2
> Incorrect syntax near the keyword 'EXCEPT'.
> Tibor Karaszi wrote:
>|||i am using sql server 2000.
kalaivanan
Tibor Karaszi wrote:[vbcol=seagreen]
> What version of SQL Server? What compatibility level for the database? EXC
EPT is new for 2005 and it
> needs compat level 90.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> news:1163742581.350491.211280@.e3g2000cwe.googlegroups.com...|||EXCEPT isn't available on 2000. It was introduced in 2005.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"kalaivanan" <mail2kalai@.gmail.com> wrote in message
news:1163760282.349339.48870@.k70g2000cwa.googlegroups.com...
>i am using sql server 2000.
> kalaivanan
> Tibor Karaszi wrote:
>|||okay.
i have completed the job using left join.
kalaivanan
Tibor Karaszi wrote:[vbcol=seagreen]
> EXCEPT isn't available on 2000. It was introduced in 2005.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "kalaivanan" <mail2kalai@.gmail.com> wrote in message
> news:1163760282.349339.48870@.k70g2000cwa.googlegroups.com...