on 01-20-2010 11:29 AM
Hi,
I am trying to read some data from the XI tables in order to retrieve information about open changelists.
The VERSIONSETID field which forms the key for the table is of type BINARY (or RAW - depending on what tool you use to view the definition).
When I execute the SQL statement below using AquaStudio, it works perfectly:
select a.OWNERNAME, b.SHORTTEXT
from XI_QCHANGELIST a, XI_QVERSIONSET b
where a.VERSIONSETID = HEXTORAW('9b1f867001e411dfb7a300144fac60d4')
and a.VERSIONSETID = b.VERSIONSETID
When I attempt to execute the statement via JDBC in a servlet I get the following SQLException:
com.sap.sql.log.OpenSQLException: The SQL statement "select a.OWNERNAME, b.SHORTTEXT from XI_QCHANGELIST a, XI_QVERSIONSET b where a.VERSIONSETID = HEXTORAW('9b1f867001e411dfb7a300144fac60d4') and a.VERSIONSETID = b.VERSIONSETID" contains the syntax error[s]: SQL syntax error: the token "(" was not expected here at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:106) at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:145)
So it does not appears to like the hextoraw() function.
I have tried using just the GUID value in quotes but then the exception thrown complains about incompatible types (binary and char)
Can someone please explain how I can use binary data as part of a select statement in the openSQL jdbc driver that SAP provides?
thanks in advance,
Brian
Never mind, I solved it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.