| Home | About Us | Sybase Training | Synergy | Consulting | Job Openings | Tech Videos | Rules and Disclaimer | Search |
![]() |
| Home | About Us | Sybase Training | Synergy | Consulting | Job Openings | Tech Videos | Rules and Disclaimer | Search |
|
control file for loading a fixed width file using BCP
|
|
11-02-2011, 09:44 PM
Post: #1
|
|||
|
|||
|
control file for loading a fixed width file using BCP
Hi, Can any one let me know how I can write a control file for loading a fixed width file using BCP. Best Regards, linga |
|||
|
11-03-2011, 04:08 AM
Post: #2
|
|||
|
|||
|
RE: control file for loading a fixed width file using BCP
What exactly do you mean by "control file" ? The shell script or bcp format file ? bcp has a format file. Check the Sybase documentation; look at the Utility Guide; then bcp; then format file. As long as the columns in the fixed width (or variable width) data file match the table, you do not need a bcp format file for loading it into a db using bcp. Such things as non-standard field separators, record terminators, etc are all handled via command line options. You only need a format file if the columns in the data file (in or out) are scrambled or the datatypes are not matched. Even then, is it easier to start out with:
For a shell script we need more information, assuming you want to cut, chop, sort, etc. The command line to launch bcp is easy enough, so I do not think that is what you are seeking. Ashirvad to my Shishyas, Cheers to the others Derek Asirvadem Information Architect / Sr Sybase DBA Website Selection of Useful Documents for the Sybase DBA |
|||
|
« Next Oldest · Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| Sybase interfaces File | dbgirl | 1 | 814 |
09-27-2012 10:48 PM Last Post: DerekAsirvadem |
|
| Write to file | karthizen | 1 | 1,090 |
04-13-2012 06:43 AM Last Post: DerekAsirvadem |
|