[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] Selecting a JPG Image



Michael,

Actually, I have accessed both LONG RAW and CLOB data using 
SQR, but there are some limitations.  LONG RAW shows up as 
a hexadecimal string in SQR.  On some versions of SQR on some
platforms, the maximum string length is 32K, so the longest
number of bytes represented by a 32K string would be a 16K
LONG RAW.  You'd have to write a routine that converted the
the hex to integer values, and write these to a binary file,
byte-by_byte.

With CLOB, the story is different.  What I have done here
is to use PL/SQL code to retreive the CLOB and break it 
into smaller pieces, which I return to SQR as separate
variables.  I then assemble these into a bigger string,
up to 32K. Due to a limitation in SQR, I think I was 
limited to 1999 characters at a time, so I had to pass
the value in 17 variables, but it worked fine.

If the data were stored in a BLOB instead of a CLOB,
you could probably blend the two approaches: use PL/SQL
code to get the values and convert the BLOB into a hex
string, pass it in pieces to SQR, and then convert from 
hex to binary to write a file.  

There are probably easier ways with PL/SQL to tell oracle to 
write a blob or clob or long raw to a file.

Ray

On Thu, Aug 12, 2004 at 02:19:07PM -0400, Pink, Michael wrote:
> I am trying to select a JPG image from a PeopleSoft table that is stored
> in PeopleSoft/Oracle as a "LONG RAW" field. When I do the sqr errors out
> on me. Can anyone tell how to select a field that is stored as a Long
> Raw ?
> 
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
----------------------------------------------------------------------
Ray Ontko   rayo@ontko.com   Phone 1.765.935.4283   Fax 1.765.962.9788
Ray Ontko & Co.   Software Consulting Services   http://www.ontko.com/

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users