I have a requirement where I need to Alter (Add 2 columns) and then update the same table.
Here is the query I tried:
ALTER TABLE A
ADD c1 int,c2 varchar(10)
UPDATE A set c1 = 23, c2 = 'ZZXX'
I need to run the above two queries at a time.
I am using Talend ETL tool, in this we have a component tMssqlrow, which allow us to run multiple queries (I am using 10 to 15 update queries in single component).
But the above query is not working.
I tested in DataBase Microsoft SQL. i am getting the below error :
Msg 207, Level 16, State 1, Line 5
Invalid column name 'c1'. Msg 207,
Level 16, State 1, Line 5
Invalid column name 'c2'.
can any one help me resolve this problem.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…