Information générale
Catégorie:
Codage, syntaxe et commandes
>I tried "Select * from a,b,c into cursor qcOutput", but i ended up with 27 records instead of 9. I know the extra records are partially because i have no join condition. What is the syntax to fix this?
I figured it out, use: "Select * from A Union Sele * from B Union Sele * from C into qcOutput"
Multiple "Union"s must get pretty ugly in a single statement. In my case, i'll only be joining 4 similar tables. Is there any price (beyond readability) to an N-Union Select statement for large values of N? (my boss and I were discussing how mysteriously SQL takes a cumbersome line of code and miraculously returns a table full of data- often what you wanted, but sometimes not)
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement