Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2009
    Posts
    2

    Red face Unanswered: about Dbisql run in shell

    hi,
    When I run the script below ,occur one error.

    bash-2.05$ dbisql -nogui -onerror exit -c "eng- iqtest;uid=DBA;pwd=SQL;links=tcpip{host=10.90.1.21 1;port=2688}" <<EOF
    >select top 1 * from table1 ;
    >EOF

    (DBA)>select top 1 * from table1 ;
    (DBA)> Execution time: 0.067 seconds

    The result returned is non-deterministic.
    SQLCODE=122, ODBC 3 State="01000"
    Line 1, column 1
    select top 1 * from tad_date

    date_id date_desc date_en_desc dow_id dow_desc dow_en_desc mth_id mth_desc mth_en_desc quarter_id quarter_desc quarter_en_desc year_id year_desc year_en_desc workday_flag weekday_flag start_time end_time pub_flag sch_flag
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    20151231 2015?12?31? 2015-12-31 4 ??? thu 12 12? dec 4 ???? Q4 2015 2015? 2015 1 0 2015-12-31 02:30:00.000000 2016-01-01 02:29:59.000000 (NULL) (NULL)

    (First 1 rows)

    (DBA)>null
    (DBA)> Could not execute statement.
    Syntax error near 'null' on line 1
    SQLCODE=-131, ODBC 3 State="42000"
    Line 1, column 1
    null
    bash-2.05$

    Where does the 'null' sql statment come from ?
    HOw can I run mutiple sql statment in dbisql ?
    thank you !

  2. #2
    Join Date
    Mar 2008
    Posts
    96
    I guess you should put the EOF at the end where your all SQL statements end.

Posting Permissions

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