Friday, February 24, 2012

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...

No comments:

Post a Comment