Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql query

Status
Not open for further replies.

bisanthe

Technical User
Joined
Nov 11, 2005
Messages
4
Location
TR
Hi,
How can I run these two query in sinlge statement.

SELECT * from VERIMEGRISI where BANKA_KODU = '1' and VERIMEGRISI = 'JPY.LIB'

SELECT * from VERIMEGRISI where BANKA_KODU = '3' and VERIMEGRISI = 'USD.GOV'

I tried this:

SELECT * from VERIMEGRISI where (BANKA_KODU , VERIMEGRISI) IN (('1','JPY.LIB'),('3','USD.GOV'))

and it doesnt work. I heard that this query is working at Oracle database but it is not a ansi sql standart. I am using mssql 2000. If no way I will run each of them in different select statement but if you have an idea pls help.
Thnx...
 
Code:
select *
  from VERIMEGRISI
 where (BANKA_KODU = '1' and VERIMEGRISI = 'JPY.LIB')
    or (BANKA_KODU = '3' and VERIMEGRISI = 'USD.GOV')



*cLFlaVA
----------------------------
[tt]I already made like infinity of those at scout camp...[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top