molar
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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
... or use angelIII's approach to bolt them all together...
ASKER
Thanks guys.
That's a real help...
That's a real help...
cheers bud. My first poinx for about a year :)