Skip to Content
author's profile photo Former Member
Former Member

how to select and compare long data from maxdb

I have sap and java db. I try select data from table with this request

sql_execute SELECT * FROM SAPPOPDB.T_CHUNK where T_CHUNK.CHUNK_DATA < '10000'

but got this response

-24988,ERR_SQL: SQL error

-7032,SQL statement not allowed for column of data type LOB

db structure

DOMAIN_HASH KEY NUMBER 10 0 SEL+UPD+ 0 1 1 25.04.2014 17:31:17 25.04.2014 17:31:17

DOMAIN_COUNTER KEY NUMBER 10 0 SEL+UPD+ 0 2 2 25.04.2014 17:31:17 25.04.2014 17:31:17

SESSION_HASH KEY NUMBER 10 0 SEL+UPD+ 0 3 3 25.04.2014 17:31:17 25.04.2014 17:31:17

SESSION_COUNTER KEY NUMBER 10 0 SEL+UPD+ 0 4 4 25.04.2014 17:31:17 25.04.2014 17:31:17

CHUNK_NAME KEY VARCHAR UNICODE 200 SEL+UPD+ 5 5 25.04.2014 17:31:17 25.04.2014 17:31:17

CHUNK_DATA OPT LONG BYTE SEL+UPD+ 6 25.04.2014 17:31:17 25.04.2014 17:31:17

please help how I can get CHUNK_DATA from table?

DB - MaxDB Thank you

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Aug 24, 2015 at 09:21 AM

    Hi,

    you cannot compare the content of CHUCK_DATA directly, because the datatype is 'long'.
    But as a workaround, you can convert the content to a string and then work with that string e.g.:

    ...where substr(T_CHUNK:CHUNK_DATA,1,5) < '10000'

    with (1,5) means building a string starting with the first character and a string length of 5 characters.

    Hope that helps,
    Thorsten

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.