if exists(select 1 from avt_po_invoicing where line_id =
671156 ) or
exists (select 1 from avt_po_rebilling where line_id =
671156 )
select 4 INTO :ll_ret ELSE select 5 into :ll_ret ;
Thnx for your response
AR
--
Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement
<AR> wrote in message news:4aa0240e.111...@sybase.com...
String ls_exists, ls_name
ls_name = "something"
ls_exists = "FALSE"
SELECT 'TRUE' INTO :ls_exists
FROM master.dbo.syslogins A
WHERE A.name = suser_name()
AND EXISTS (
SELECT * FROM dba.TABLE_NAME
WHERE COLUMN_NAME = :ls_name
);
If ls_exists = "TRUE" Then
...
End If
<AR> wrote in message news:4aa0240e.111...@sybase.com...
String ls_exists
ls_exists = "FALSE"
SELECT 'TRUE' INTO :ls_exists
FROM avt_system_environment
WHERE 1 = 2
OR EXISTS (
SELECT 1 FROM avt_po_invoicing
WHERE line_id = :adb_line_id ) OR exists (select 1
from avt_po_rebilling where line_id = :adb_line_id );
AR
Or you could use execute immediate or one of the dynamic sql cursor
formats...
I agree that;s how I would have done it....easier to modify the stored
procedure than modify the PB app and recompile and redeploy.
--
Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement
"Chris Fauvel" <avach...@gmail.com> wrote in message
news:518ffea9-5b3e-4644...@e8g2000yqo.googlegroups.com...