07-31-2023, 09:39 AM
In order to get INSERT statement with filtered record(WHERE QUERY) you can
1. RIGHT CLICK TABLE SCRIPT TABLE AS > CREATE TO > NEW QUERY
2. RENAME IT WITH TEMP_TABLE
3. NOW RUN
SELECT INTO TEMP_TABLE FROM YOURFIRST TABLE WHERE NOW YOUR CRITERIA HERE
In this way you temp table will have only the record that you want ,
Now by running script wizard as explained by **@Mike Ritacco** with DATA ONLY you will get the exact insert statements.
1. RIGHT CLICK TABLE SCRIPT TABLE AS > CREATE TO > NEW QUERY
2. RENAME IT WITH TEMP_TABLE
3. NOW RUN
SELECT INTO TEMP_TABLE FROM YOURFIRST TABLE WHERE NOW YOUR CRITERIA HERE
In this way you temp table will have only the record that you want ,
Now by running script wizard as explained by **@Mike Ritacco** with DATA ONLY you will get the exact insert statements.