Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIF(,,) in an SQL Server SQL Statement
Message
De
20/04/2000 09:53:20
 
 
À
19/04/2000 11:02:20
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00360347
Message ID:
00361766
Vues:
19
>>
SELECT city, state, population
>>FROM countrydata
>>WHERE population = (
>> SELECT MAX(population)
>> FROM countrydata cd
>> WHERE state = countrydata.state)


>I would have to agree, VFP should do the same thing.
>
>As for your correlated sub query, what is the "cd" in the from clause for, or is it one of those off the cuff things :) I will have to play around with sub queries, they could be pretty potent.

The cd is an alias for the countrydata table. Within the query I can know refer to the countrydata table as cd. In this instance, it lets the engine determine which instance of the countrydata table I'm referring to.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform