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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Insted of "INTERSECT"

Author  Topic 

sponguru_dba
Yak Posting Veteran

93 Posts

Posted - 2006-10-23 : 03:05:48
Hi


all Iam have query with "INTEREST"operator this is Oracle specifc

Insted of intersect i want other alternative which is ahaving eligibility to work both oracle and Sql Server


can some help me on this issue
Thanks in Advance
SreenivasaRao

SreenivasaRao
Bangalore,INDIA

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-10-23 : 03:12:22
see here http://vyaskn.tripod.com/oracle_sql_server_differences_equivalents.htm


KH

Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-10-23 : 03:52:48
if you're running SQL server 2005 you can use INTERSECT operator.
It also has except operator.



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

sponguru_dba
Yak Posting Veteran

93 Posts

Posted - 2006-10-23 : 06:32:37
hi all

Iam getting "Server: Msg 156, Level 15, State 1, Line 9
Incorrect syntax near the keyword 'WHERE'."
if i run this

select a,b,c,d,e from A w,B x,C y,D z WHERE x.one=y.one and ....

where exists

select a,b,c,d,e from A k,B l,C m,D n WHERE k.one=l.one and .... order by d

thanks in Advance
Sreenivas




SreenivasaRao
Bangalore,INDIA
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-23 : 06:39:26
Read about the use of EXISTS keyword in BOOKS ONLINE.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-10-23 : 06:41:19
General Syntax

Select columns from table T where exists
(select * from othertable where keycol=T.keycol)

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -