[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] Clob, sqr and sql variables
- Subject: [sqr-users] Clob, sqr and sql variables
- From: edwin.hommes@bluewin.ch
- Date: Tue, 1 Feb 2005 14:21:21 +0100
- Delivery-date: Tue, 01 Feb 2005 08:22:50 -0500
- In-reply-to: <E1CvxWd-0007O7-00@seldon.sqrug.org>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
Rather than moving LONG field values around, especially if you only want
to know whether or not it contains a value, you could use a simple oracle
select.
example
select *
from table
where LONG_field is not null;
This returns only those rows which have a value in their long field.
hope this helps.
>Beginn der beigefügten Nachricht
>
>From: Melody Sayles <Melody.Sayles@alaska.edu>
>Subject: [sqr-users] Clob, sqr and sql variables
>Date: Mon, 31 Jan 2005 14:47:29 -0900
>To: sqr-users@sqrug.org
>Reply-To: "This list is for discussion about the SQR database reporting
> language from Hyperion Solutions." <sqr-users@sqrug.org>
>
>
>Oracle 9, sqr 8, unix
>I'm using an sqr program to create a report based on a table where one of
>the
>columns is a CLOB. I found the DBMS_LOB.GETLENGTH function. All I need from
>the
>clob column is if there is text in there or is it null. I haven't been able
>to
>find the right syntax to move the value of a variable from the sql to sqr
> so
>that I can set a flag of null or 'Y'.
>Code so far (and I'm open to suggestions):
>begin-procedure Get-Text
>begin-sql
>DECLARE
> locator_var clob;;
> length_var integer;;
>BEGIN
> select sor2ppt_text into locator_var
> from sor2ppt
> where sor2ppt_pidm = $control_pidm
> and sor2ppt_contact_date = $orig_contact_date
> and sor2ppt_contact_from_time = $contact_from_time;;
> length_var := DBMS_LOB.GETLENGTH(locator_var);;
>END;;
>end-sql
>
>!if $length_var > 0
>! Let $comments = 'Y'
>!else
>! Let $comments = ''
>!end-if;
>end-procedure Get-Text
>
>Thanks in advance,
>Melody
>
>
>
>
>Ende der beigefügten Nachricht
>
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users