Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15694

How to insert data from one table to other table in sql WHERE conditon

$
0
0

i want to insert all data from one table to other table in specific column

am using this code

INSERT INTO  coll_details (cd_ac_type, cd_ac_name,cd_ac_no,cd_amt,cd_fine_amt,cd_rcpt_no,cd_status) SELECT * FROM temp WHERE temp.status="Y"

BUT error occured like this

""COLUMN name or number of  supplied values does not match with table defanition ,invalid column name "Y"

table names are correct and values in status  contains Y or N


Viewing all articles
Browse latest Browse all 15694

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>