to create format file for bcp in


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users to create format file for bcp in
# 1  
Old 02-27-2009
Java to create format file for bcp in

I want to create the format file for bcp in a file to the table.
My Versions are:
Unix: Sun OS,
DB: Sybase.

How can i create the format file.
Is there any way to create the format by bcp command
or some system sp.

Please help.
# 2  
Old 02-27-2009
Hi all ,

i have tried this command
bcp db..tablename out outpath/outfile.txt -f formatpath/formatfile.FMT -N -Uuser -Sserver -Ppass

I got the below error:
Code:
bcp: Unable to open format-file "formatpath/formatfile.FMT "

Then i created a file "formatfile.FMT" in the formatpath and then tried the same command

getting the different error:
Code:
I/O error while reading bcp format-file.

Please help me.

Last edited by Yogesh Sawant; 04-08-2009 at 07:26 AM.. Reason: added code tags
# 3  
Old 02-27-2009
For that IO Error,
i checked the file system, enough space is available.
till i am getting the same error.

Please help me.
# 4  
Old 04-08-2009
prasad,

Try with .dat file with -C tag

Code:
bcp db..sample out act.dat -SSERVER -UUSER -PPWS -c -t~

it might wroks. Revert me if you have faced any issues on this.

Last edited by Yogesh Sawant; 04-08-2009 at 07:27 AM.. Reason: added code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Create movie from jpg (or other picture format) file

hi linux expert is there any program for create movie file from pictures file (like jpg)? Many Thanks samad (1 Reply)
Discussion started by: abdossamad2003
1 Replies

2. Shell Programming and Scripting

How to create a file from output of vertica table query in UTF-8 format?

Hello, In my shell script, I extract table data from HP Vertica DB into a csv file using vsql -c command. But the problem is the file getting created is in binary format and hence some of the data becomes unreadable which has chinese characters as part of data. file -i filename.csv - gives... (2 Replies)
Discussion started by: Dharmatheja
2 Replies

3. Shell Programming and Scripting

Best way to point/update a file during PROD and BCP failover.

Hi All, In UNIX servers we are switching from DR to PROD. After switching to DR we need to update some configuration files which contains the server names. Ex - If we switch to BCP we need to update BCP server name. If we switch back to PROD we need to update PROD server name. I... (1 Reply)
Discussion started by: Girish19
1 Replies

4. Shell Programming and Scripting

Needed touch command to create a file in the following format

needed touch command to create a file in the following format touch a_yyyymmdd_hhmmss (1 Reply)
Discussion started by: hemanthsaikumar
1 Replies

5. Programming

Create table with date format.

Hello, Could you please let me know the correct format of CREATE TABLE statement with DATE format. CREATE TABLE EMP_TABLE1 ( NAME VARCHAR(6) PRIMARY KEY, ADDRESS VARCHAR(6), BIRTH_DATE DATE ); I want BIRTH_DATE to be in "YYYYMMDDHHMISS" format. How we can create table with... (4 Replies)
Discussion started by: Poonamol
4 Replies

6. Shell Programming and Scripting

how can I bcp out a table into a text file including the header row in the text file

Hi All, I need to BCP out a table into a text file along with the table headers. Normal BCP out command only bulk copies the data, and not the headers. I am using the following command: bcp database1..table1 out file1.dat -c -t\| -b1000 -A8192 -Uuser -Ppassword -efile.dat.err Regards,... (0 Replies)
Discussion started by: shilpa_acc
0 Replies

7. Shell Programming and Scripting

How to format or create a matrix report from file

Dear Unix champs, I have a input file as attached, i would like to create an report from the file as below FileType | EQUENS0001 | EQUENS0002 | EQUENS1100 | EQUENS0003 --------+-------------------------------------------------------- Msg No |... (3 Replies)
Discussion started by: manas_ranjan
3 Replies

8. Shell Programming and Scripting

Help to Create this file format structure

This data comes form the table and exported into the file in this format File1 Format weboffercode1,sourcecode1,1,1,1,1,1,1 weboffercode1,sourcecode2,1,1,1,1,1,1 weboffercode1,sourcecode1,1,1,1,1,1,1 weboffercode1,sourcecode3,1,1,1,1,1,1 weboffercode1,sourcecode3,1,1,1,1,1,1 ... (4 Replies)
Discussion started by: enigma_83
4 Replies

9. Shell Programming and Scripting

create filename with 'DD/MM/YYYY' date format

Hi, I can use the following command to create a file with some name then underscore and then date appended to it in the format 'DD-MM-YYYY': touch "newfile_`date '+%d-%m-%Y'`" But it gives me error when I try with the similar command to create a file with the date format 'DD/MM/YYYY'. I... (4 Replies)
Discussion started by: royalibrahim
4 Replies

10. UNIX for Dummies Questions & Answers

How to create concatenate a file in tab format

Hi, Do you know given a file which is SED at the same time, how to read it and AWK it in tabs format. Means:- I have an input file which is (at the same time perform sed):- 1 2 3 4 5 6 7 I would like to print out in tab format which is:- 1 2 3 4 5 6 7 .... (12 Replies)
Discussion started by: ahjiefreak
12 Replies
Login or Register to Ask a Question