Link to home
Start Free TrialLog in
Avatar of molar
molarFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Can I append a table with all fields from another table.

I have two tables with the same column. The second was created using select * into <tableb> from <tablea> where amount x > y dollars

I would like to append tableb with another set of information from table a with another condition (ie colx > const y).  I can't just compound it intot the same where statement as the result sets are not mutually exclusive

eg for an item in the table worth 10000 dollars, it would be selected on a filter for >1000 and >5000 dollars, so it should appear twice in table b.

One way might be to use inserts but there's a lot of columns, and the column list changes fairly frequently so I don't want to have to specify each column individually.

Is there a simpler way of appending the data from several queries in a single table?
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of solution46
solution46

... or use angelIII's approach to bolt them all together...
Avatar of molar

ASKER

Thanks guys.
That's a real help...

cheers bud. My first poinx for about a year :)