Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Posts
    6

    Unanswered: unload command in sp

    Hi, does somebody know is it possible to execute unload command in sp? Because, I have an error - 201: a syntax error on the such row. If it is not, please advice me how to solve the problem. The idea of the sp is to make a text file unloaded from one db table. The criteria for uploading are founded in other db table.
    Thanks in advance

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780

    Re: unload command in sp

    Originally posted by FLO
    Hi, does somebody know is it possible to execute unload command in sp? Because, I have an error - 201: a syntax error on the such row. If it is not, please advice me how to solve the problem. The idea of the sp is to make a text file unloaded from one db table. The criteria for uploading are founded in other db table.
    Thanks in advance
    Hi,

    SPL not support unload data, then created a SPL and command execute system("script").
    Where script it can be:

    dbaccess databasename 2>errorfile <<EOF
    unload to filename.unl
    select condition.....
    EOF

    or

    dbaccess databasename 1>>filename.unl 2>errorfile <<EOF
    select condition.........
    EOF

    Gustavo.

Posting Permissions

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