Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2008
    Posts
    15

    Unanswered: can we use where clause in bcp in sybase

    Hi,
    I tried this command but i am getting error Erro:156 when i am using where clause in bcp

  2. #2
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    If you want to bcp a specific set from a table, create a view for that set and bcp out from the view:
    create view <viewname>
    as
    select <columns>
    from <table>
    where <condition>
    This view should give all the data you want to bcp out.
    Then, use the bcp-command to extract the data:
    bcp <db>..<viewname> out <filename> <other parameters>
    I'm not crazy, I'm an aeroplane!

  3. #3
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    You could also use sqsh which is a sort of advanced isql. This allows bcp'ing while using a where clause.

Posting Permissions

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