Need help on sql select statement?
I am writing two queries that select fields from a dataset:
select r.fld1, s.fld2, s.fld3, r.fld4 from file.a r left outer join filex s where r.fld1=s.fld1;
and
select r.fld1, s.fld2, s.fld3, r.fld4 from file.b r left outer join filex s where r.fld1=s.fld1;
Note that the only difference is in the first file name (file.a vs file.b)
I just want to list all the entries from each file; no summarizing
Can I write one statement instead of two?
What you want is called a SQL Union.
See the following tutorial on how to use this operator:
http://www.w3schools.com/sql/sql_union.asp
Ranking Member Sensenbrenner’s opening statement at the Select Committee on Global Warming’s “From Poznan to Copenhagen” hearing on February 4, 2009.
Representative Rush Holt’s statement on the problems with the FISA “RESTORE Act.” Holt is a member of the House Intelligence Committee and Chairman of the newly-created Select Intelligence Oversight Panel) statement on the house flor
Shai Agassi’s opening statement during a recent Select Committee on Energy Independence and Global Warming hearing entitled, “$4 Gasoline and Fuel Economy: Auto Industry at a Crossroads”