Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple fields in Subquery
Message
 
 
À
23/05/2007 15:53:12
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01228038
Message ID:
01228045
Vues:
11
This message has been marked as the solution to the initial question of the thread.
SQL Server does not support such queries. Try
Select * from TopTable 
WHERE EXISTS 
(select * from table2 inner join  table1
	on table1.facID = table2.facID
	and table1.billingID = table2.billingID
	WHERE toptable.number = table2.bill_number AND toptable.date = table2.service_date  )
>
>I'm trying to do something simple. I'd like to match 2 fields on a subquery.
>Is this possible?
>Select * from TopTable
>toptable.number, toptable.date IN
>(select table2.bill_number, table2.service_date from table1
>	inner join  table2
>	on table1.facID = table2.facID
>	and table1.billingID = table2.billingID)
>
>If I run the sub query by itself..it works fine.
>I'm just not sure if you can match the fields this way.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform