Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sapator
Constraint Violating Yak Guru
462 Posts |
Posted - 2014-07-15 : 05:58:44
|
Hi. I have this specs:Field Name Type SizePolicy no TEXT 8Registration TEXT 15Customer name TEXT 30Customer address TEXT 30Customer province TEXT 30Customer telephone TEXT 15Cover start date DATE 8Cover end date DATE 8Policy First issue date DATE 8Cover code TEXT 3Vehicle make TEXT 20Vehicle model TEXT 20Vehicle year NUMBER 4Office TEXT 1I would like to know if it is possible to create a format file for this. I have a problem understanding mostly the Host file data type. I want the date to be YYYYMMDD , how would i format this as i don't see any xtra options. A small example of e lines for date,text and number will be appreciated.Thanks. |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-07-15 : 09:43:54
|
Not sure what you want. Are you looking for how to create a table as the target of the bulk insert? |
|
|
sapator
Constraint Violating Yak Guru
462 Posts |
Posted - 2014-07-15 : 09:50:44
|
Yes, i have a table with the columns as above and the file.txtThe problem are many. 1)The file is not csv compliant so i has something like "asadsasd asdsda asd12312 asd asd asd" but, from above, i know what the field max length is. I was also asking for the format file that will go to WITH(FORMATFILE='C:\blah\f.xml) in order to somehow manipulate the "/r" or "/t etc, but i guess i can do it outside of the file (into the "WITH")..As i've read, it cannot be done and i am yet to create a temp table with the complete rows and then do substrings. So can it be done?Thanks. |
|
|
|
|
|