I am naveen.i have a problem while i had bcp out the data previously.But i changed the table format means added columns into the table.i want to bcp in the old data which does not exist the additional columns. I used like this way:
1)i created another table of old format.
2)bcp in the data.
3) create view on that table along with added columns.
4)bcp out the data using the view.
5)bcpin the data into new format table.
but i have to create another 2 objects in that table.
I created a table called student(sid,class,grade).I used to take bcp-out data every day.Now I add a column called 'status' in the middle of table i.e (sid,class,status,grade).So now i want to bcpin the data. For this i created a table with student_old(sid,class,grade) columns. bcp in the data into this table.create view stdetails_view as select sid,class,status=1,grade from student.bcp out the data using view.bcpin data into student.
After bcp in to student_old
insert into student select sid,class,1,grade from student_old
drop table student_old
set a default value for status
alter table student replace status default 1
bcp in to new table with format file
and specify grade as column 4 e.g.