For your first reply : I would prefer to go with old numbers for the ID column, as that would be easy in case you want to refer/compare to the old table in any case.
For your second reply : That was a sample I posed. In case you want to insert rows based on some criteria, that is how you can use. So you got to replace COLUMNX with your original ColumnName and ValueX with the value, you would like to compare with.
For your 3rd reply : You got to post the entire query here, to look into it and suggest you where you go wrong.
For your 4th reply : You can put * after the SELECT keyword if you would like to port all the columns into the resulting table, else you will have to list them one by one, in the order as desgined in the resulting table.
In case the Resulting table is not created already, you can use
Code:
SELECT COLUMNLIST INTO NEWTABLENAME
FROM OLDTABLENAME WHERE COLUMNAMEX=VALUE
All in BLUE above are subject to change based on your requirement.
SELECT INTO is similar to INSERT INTO except that it creates a newtable as mentioned and then inserts the rows, but INSERT INTO inserts rows into existing table.
Hope that helps.
Cheers!
_________________________
- Vijay G
Strive for Perfection