I have a few sql queries that select data from a table on 1 database and stores it in a table on a different database. My problem comes when the table on the second database has an additional column which i want to add text dependant on what query is run. i.e. the name of the query.
example query (Where columns on both database tables are the same)
insert into testtable (col1,col2,col3)
select col_a,col_b,col_c
from anothertest.testtable
where col_a = 'test';
How do I declare say col4 = 'thisQuery' in the above statement?
hope this makes sense. :happysad:
example query (Where columns on both database tables are the same)
insert into testtable (col1,col2,col3)
select col_a,col_b,col_c
from anothertest.testtable
where col_a = 'test';
How do I declare say col4 = 'thisQuery' in the above statement?
hope this makes sense. :happysad: