Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid column name
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00368854
Message ID:
00369299
Vues:
14
>It worked like a champ, but what does "As a" do?

This query uses a derived table. In the FROM clause I've specified a query. The AS a give the results of the query an alias. It's similar to:

select a.au_lname, a.au_fname from authors a

Again 'a' is an alias. This time for the authors table.

>Why did mine not work?

I's kind of strange but the column 'alpha' doesn't exist during the execution of the query. It's a column heading that's assigned when the results are being pulled together. The ORDER BY clause get around this by allowing you to specify the column by ordinal position.

-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