Rocket U2 | UniVerse & UniData

 View Only
  • 1.  UOPY SQL statement fails, but works at TCL prompt.

    Posted 12-02-2022 17:02
    Hoping this is the correct forum for a UOPY/U2 question.

    Using U2 11.3.4 and UOPY 

    I'm having an issue with UOPY sending an SQL select statement that works @ TCLprompt.

    Retrieve command:
    This works from Python using BOTH UOPY and TCL prompt:   
          SELECT TABLE1 WITH ORDER.NO = 177
    This only returns the index value, but it works

    SQL command:
    This works at TCL prompt, but fails going thru Python/UOPY:
         SELECT CITY FROM TABLE1 WHERE ORDER.NO = 177;

    I have tried with "177"    double quotes or single quotes  '177'.  Also with/out  ; at the end
    I have tried sending the command as both uppercase and lowercase.


    What am I missing?
    Thanks for your time.






    ------------------------------
    Dave Evans
    Programmer
    Combined Transport Inc
    central point OR US
    ------------------------------


  • 2.  RE: UOPY SQL statement fails, but works at TCL prompt.

    Posted 12-02-2022 18:26
    UPDATE from Dave.

    I replaced my  cmd.command_text = ' the select  statement'
    with cmd = uopy.Command('the select statement')
    then 
    cmd.run()
    looked at "cmd.response" returned value  I now have the value I expect.

    Dave

    ------------------------------
    Dave Evans
    Programmer
    Combined Transport Inc
    central point OR US
    ------------------------------