Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#36 Parsing of multi line queries does not w

Squirrel SQL
closed-fixed
Colin Bell
None
5
2015-01-08
2002-05-17
Anonymous
No

Parsing of queries that span multiple lines do not
work, eg. a query like the following:
-----------------
select to_char(min(date_time),' yyyy-mm-dd hh24:mi')
starttime, substr(line,1,10) course
from timetable
where DUTY_INSTANCE_ID =
(select distinct duty_instance_id
from timetable
where trunc(date_time) = trunc(sysdate)
and line like '266|8|%'
)
group by line
-----------------
does not work as long as I do not put it in one line
only!

This is the error I get:
-------------
Error: ORA-00911: Ungültiges Zeichen

SQLState: 42000
ErrorCode: 911

Discussion

  • Logged In: NO

    I forgot to mention I'm using 1.1beta2 where the doc sais
    that this bug sould be fixed...

     
  • Colin Bell
    Colin Bell
    2002-05-18

    • assigned_to: nobody --> colbell
     
  • Colin Bell
    Colin Bell
    2002-05-18

    Logged In: YES
    user_id=233132

    Is it any multi-line query that doesn't work or just the one
    above? I.E. does

    select *
    from timetable
    order by line

    work correctly?

    Col

     
  • Ken Arway
    Ken Arway
    2002-05-28

    Logged In: YES
    user_id=495682

    FWIW, here's the Oracle error explanation:

    ORA-00911 invalid character
    Cause: Special characters are valid only in certain places. If
    special characters
    other than $, _, and # are used in a name and the name is
    not enclosed in double
    quotation marks (), this message will be issued. One
    exception to this rule is
    for database names; in this case, double quotes are stripped
    out and ignored.
    Action: Remove the invalid character from the statement or
    enclose the object
    name in double quotation marks.

     
  • Logged In: NO

    Yes,

    select *
    from timetable
    order by line

    works correctly!

    There seems to be a problem if 'some string' is used on
    multiple lines.

     
  • Logged In: NO

    Yes,

    select *
    from timetable
    order by line

    works correctly!

    There seems to be a problem if 'some string' is used on
    multiple lines.

     
  • Colin Bell
    Colin Bell
    2002-06-12

    Logged In: YES
    user_id=233132

    I've finally got some time with Oracle to take a look at
    this. I created a timetable table

    create table timetable (DUTY_INSTANCE_ID number, starttime
    date, date_time date, line varchar(100), course varchar(50))

    and issued your SQL statement (as formatted above) and it
    worked correctly, no errors. This was Oracle 8.1.6 with the
    8.1.6 thin and OCI drivers, and the JDBC/ODBC bridge. I was
    also using the latest version of SQuirreL (1.1beta4)
    although there shouldn't have been any changes since beta2
    in this area.

    Could you try with 1.1beta4 and see if the problem has gone
    away.

    Could you also tell me which version of Oracle and JDBC
    driver you are using.

    Col

     
  • Logged In: NO

    It works now with 1.1beta4.

    I use Oracle 9i and the latest jdbc driver 9.2.0.1 on Java1.4

    Thanks, Max

     
  • Colin Bell
    Colin Bell
    2002-06-12

    • status: open --> closed-fixed
     
  • Colin Bell
    Colin Bell
    2002-06-12

    Logged In: YES
    user_id=233132

    Great news. Looks like we fixed it by accident ;)

    Col