Results 1 to 3 of 3

Thread: bcp problem

  1. #1
    Join Date
    Feb 2003
    Posts
    2

    Unanswered: bcp problem

    In Sybase to take the data into a text file i tried the following procedure, but it is giving the error, colud any one give the solution at the earliest.

    C:\>isql -Usa -S 192.168.100.5
    Password:
    1> bcp SAMP..PACKAGE out "C:\test.txt" -c -t "|"
    2> go
    Msg 102, Level 15, State 1:
    Line 1:
    Incorrect syntax near '.'.
    1> use SAMP
    2> go
    1> bcp PACKAGE out "C:\test.txt" -c -t "|"
    2> go
    Msg 179, Level 15, State 1:
    Line 1:
    Can't use the OUTPUT option when passing a constant to a stored procedure.
    1> bcp PACKAGE out C:\test.txt -c -t |
    2> go
    Msg 179, Level 15, State 1:
    Line 1:
    Can't use the OUTPUT option when passing a constant to a stored procedure.
    1> bcp PACKAGE out "C:\test.txt" -c -t|
    2> go
    Msg 179, Level 15, State 1:
    Line 1:
    Can't use the OUTPUT option when passing a constant to a stored procedure.
    1>

  2. #2
    Join Date
    Jun 2002
    Location
    Dublin, Ireland
    Posts
    23

    Re: bcp problem

    Hi,

    You don't run bcp within isql. You run it from your OS command line.
    e.g.
    bcp SAMP..PACKAGE out "C:\test.txt" -c -t "|" -Usa -P -S 192.168.100.5

    This should sort you out.

    Regards,


    Originally posted by osampath
    In Sybase to take the data into a text file i tried the following procedure, but it is giving the error, colud any one give the solution at the earliest.

    C:\>isql -Usa -S 192.168.100.5
    Password:
    1> bcp SAMP..PACKAGE out "C:\test.txt" -c -t "|"
    2> go
    Msg 102, Level 15, State 1:
    Line 1:
    Incorrect syntax near '.'.
    1> use SAMP
    2> go
    1> bcp PACKAGE out "C:\test.txt" -c -t "|"
    2> go
    Msg 179, Level 15, State 1:
    Line 1:
    Can't use the OUTPUT option when passing a constant to a stored procedure.
    1> bcp PACKAGE out C:\test.txt -c -t |
    2> go
    Msg 179, Level 15, State 1:
    Line 1:
    Can't use the OUTPUT option when passing a constant to a stored procedure.
    1> bcp PACKAGE out "C:\test.txt" -c -t|
    2> go
    Msg 179, Level 15, State 1:
    Line 1:
    Can't use the OUTPUT option when passing a constant to a stored procedure.
    1>
    Mark Sheehan,
    Senior Sybase DBA

  3. #3
    Join Date
    Feb 2003
    Posts
    2

    Re: bcp problem

    Hi Mark Sheehan,

    Thanks, it's working

    Sampath

    Originally posted by msheehan
    Hi,

    You don't run bcp within isql. You run it from your OS command line.
    e.g.
    bcp SAMP..PACKAGE out "C:\test.txt" -c -t "|" -Usa -P -S 192.168.100.5

    This should sort you out.

    Regards,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •