April 22, 2011 at 2:26 pm
I receive semi colon delimited txt file and the column placements/position are always same. Currently, I am having to import it to excel and add column header to each. Any suggestions on how it can be automated?
April 22, 2011 at 4:33 pm
Would you please be a little more specific what you're trying to do?
Do you have to import the data into SQL Server? Does the target table already exist?
What method do you use to get the data into SQL Server (if that's waht you'Re trying to do): SSIS, bcp, OPENROWSET, ...?
April 23, 2011 at 3:00 am
JStevenson1 (4/22/2011)
I receive semi colon delimited txt file and the column placements/position are always same. Currently, I am having to import it to excel and add column header to each. Any suggestions on how it can be automated?
You are moving data from .txt to .xlsx ... why are you doing this? Why have you posted on a SQL Server forum when SQL Server has no apparent relevance to the content of your post?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
April 23, 2011 at 3:52 am
@Phil: the way I read it is that the OP needs Excel to add the column names manually and (guessing starts here) will import it into SQL Server based on the newly created Excel file. But I could be totally wrong...
If it's just to add the column names I'd probably use the good old DOS approach: copy columnfile.txt + datafile.txt 😉
April 23, 2011 at 11:32 am
LutzM (4/23/2011)
@Phil: the way I read it is that the OP needs Excel to add the column names manually and (guessing starts here) will import it into SQL Server based on the newly created Excel file. But I could be totally wrong...If it's just to add the column names I'd probably use the good old DOS approach: copy columnfile.txt + datafile.txt 😉
🙂 yeah, I'm sure it's something like that. But why throw Excel into the equation at all (as you imply with your DOS suggestion)? Why worry about column names either? Just knowing the column ordinals should be enough ... Too many unknowns here.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply