Announcement

Collapse
No announcement yet.

Invalid SQL statement

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Invalid SQL statement

    I'd like to use the following statement in a transformer step:

    Code:
     var expression = (<r><![CDATA[
    declare  
    	m_c2 varchar2(5000); 
    	m_c3 varchar2(5000); 
    	m_c4 varchar2(5000); 
    	pos integer;
    	text_len integer;
    	i integer;
    begin
     select xxxBlockedxxx into m_c2 from CW_PLATZ
     where Bezeichnung like 'HYXFC1J';
     select utl_raw.cast_to_varchar2(hextoraw(m_c2)) into m_c3 from dual;
     pos := 0;
     m_c4 := replace(m_c3,chr(13),chr(13));
     dbms_output.put_line(text_len);
     for i in pos..pos+9 LOOP
           dbms_output.put_line(SUBSTR(m_c4, i,255));
           END LOOP;
    end;
      ]]></r>«»).toString();
    
    var rs = dbConn.executeCachedQuery(expression);
    It results in an exception that says 'Invalid SQL statement', though.

    Question:
    Can I use the above statement at all in mirth (pl/sql)?
    how would I have to format the sql to get it working ?

    thanks,
    chris
    svart
    OL/Germany

  • #2
    Re:Invalid SQL statement

    If you're getting an invalid SQL statement error then your database is throwing it and not Mirth. There is a slight chance that the statement is valid and the database driver doesn't like it.

    Try running the query directly against the database and see what you get. Also, post the error message you're getting. Invalid SQL errors usually tell you where the problem is.

    Viel gluck!
    Jon Bartels

    Zen is hiring!!!!
    http://consultzen.com/careers/
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.

    Comment

    Working...
    X