on 08-21-2015 4:23 PM
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
D
OMAIN_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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Exception of type com.sap.sql.log.OpenSQLException caught: The SQL statement " DELETE FROM BC_UDV3_ROLES WHERE PERMISSION_ID = 'x' AND 0=(SELECT count(*) FROM SAPPOPDB.T_CHUNK, SAPPOPDB.J2EE_CONFIGENTRY WHERE substr(T_CHUNK.CHUNK_DATA,1,5) < '1000' AND '1'='1')AND '1'='1'" contains the syntax error[s]: - 1:142 - SQL syntax error: the token "(" was not expected here
.#
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.