SQL Server Performance Forum – Threads Archive
Basic Insert at DTS or after questionOk, I have a table that contains a number of columns, one of these columns contains a ‘unitref’ e.g.AC02/001D. I import a new set of records, approx 7,000 per week in a DTS package from CSV Flat File into the table. What I need to achieve at either the point of import of new data weekly, or once the new data is sitting in its final resting home, is a copy of the first two 2 Chars of the UnitRef, in the example above, this would make it ‘AC’ and then place that in a column named ‘site_ref’. Having posted the question on this forum relating to grabbing the first two chars of a value and placing them in a temporary table by utilising the Left(field,2) command in SQL, I was wondering how I can do this possibly by using the inesrt into type command. I have many columns that get imported this is only a tiny step of many things that ideally would need to happen on an import, Regards Toni Chaffin
Have you tried to import the rows to a staging table and then use the SELECT INTO to port the data to main tables. Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
This posting is provided â€œAS ISâ€ with no rights for the sake of knowledge sharing.