Add Null value to cursor
Bert de Nooij
bert.dn@arma.nl
Thu, 7 Mar 2002 16:02:31 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_0006_01C1C5F1.7CD6B2C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
RE: Add Null value to cursorHi Mark,
The Cursorname is just a typing error, so I would not confuse you with all
the Dutch.But it did
Your example works as long as test is alfanumeric, however I want it to be
date field.
Let me show you the complete example.
Bert
cancel clear
sql in AL_DB declare CURSOR_INVERZEKERING cursor for
&
select CONTRACTNR , CALC_BASIS_VOLGNR , NAWNR_VERZ_MY , &
DAT_INNAME
&
from CONTRACT_GEG
&
where CONTRACTNR = 2002017030
&
union
&
select CONTRACTNR , 1 as CALC_BASIS_VOLGNR , NAWNR_VERZ_MY , &
'' as DAT_INNAME
&
from BESTEL_GEG
&
where CONTRACTNR = 2002017030
access CURSOR_INVERZEKERING
-----Original Message-----
From: Fry, Mark [mailto:Mark.Fry@COGNOS.com]
Sent: donderdag 7 maart 2002 15:20
To: 'bert.dn@arma.nl'; PH listserver
Subject: RE: Add Null value to cursor
Hi Bert,
Hmmm - in your example, the cursor you declare (CURSOR_TEST) is not the
cursor you are accessing (CURSOR_INVERZEKERING), but besides that, give the
following a try...
sql in AL_DB declare CURSOR_TEST cursor for &
select CONTRACTNR , NAWNR , '' as test &
from CONTRACT_GEG &
where CONTRACTNR = 2002017030
access CURSOR_TEST
Best regards,
Mark Fry
Cognos Limited
email: Mark.Fry@Cognos.com
Cognos Limited
Registered in England, number 1635598. Registered office: Westerly
Point, Market Street, Bracknell, Berkshire, RG12 1QB
-----Original Message-----
From: bert.dn@arma.nl [mailto:bert.dn@arma.nl]
Sent: 07 March 2002 14:01
To: PH listserver
Subject: RE: Add Null value to cursor
Hi all,
In a cursor (Oracle) I would like to add an extra column with value
"NULL"
As NULL is a reserved word I need to enclose it in double quotes ( Yes,I
did
RTFM!)
However PH keep complaining that the column cannot be found.
sql in AL_DB declare CURSOR_TEST cursor for &
select CONTRACTNR , NAWNR , "NULL" as test &
from CONTRACT_GEG &
where CONTRACTNR = 2002017030
access CURSOR_INVERZEKERING
*E* Error parsing SQL statement.
DMS-E-GENERAL, A general exception has occurred during operation 'prepare
request'.
DMS-E-RBI_COLUMN, Column NULL was not found.
When I do this directly in SQL there is no problem.
Any suggestions?
Bert de Nooij
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
This message may contain privileged and/or confidential information. If
you have received this e-mail in error or are not the intended recipient,
you may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so. Thank you.
------=_NextPart_000_0006_01C1C5F1.7CD6B2C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: Add Null value to cursor</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D995024214-07032002><FONT color=3D#0000ff size=3D2>Hi=20
Mark,</FONT></SPAN></DIV>
<DIV><SPAN class=3D995024214-07032002><FONT color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D995024214-07032002><FONT color=3D#0000ff size=3D2>The =
Cursorname is=20
just a typing error, so I would not confuse you with all the Dutch.But =
it=20
did</FONT></SPAN></DIV>
<DIV><SPAN class=3D995024214-07032002><FONT color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D995024214-07032002><FONT color=3D#0000ff =
size=3D2>Your example=20
works as long as test is alfanumeric, however I want it to =
be date=20
field.</FONT></SPAN></DIV>
<DIV><SPAN class=3D995024214-07032002><FONT color=3D#0000ff size=3D2>Let =
me show =20
you the complete example. </FONT></SPAN></DIV>
<DIV><SPAN class=3D995024214-07032002><FONT color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D995024214-07032002><FONT color=3D#0000ff=20
size=3D2>Bert</FONT></SPAN></DIV>
<DIV><SPAN class=3D995024214-07032002><FONT color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D995024214-07032002><FONT color=3D#0000ff =
size=3D2>cancel=20
clear</FONT></SPAN></DIV>
<DIV><FONT color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><SPAN class=3D995024214-07032002><FONT color=3D#0000ff size=3D2>sql =
in AL_DB=20
declare CURSOR_INVERZEKERING cursor=20
for &nbs=
p;  =
; =
=20
&<BR>select CONTRACTNR , CALC_BASIS_VOLGNR , NAWNR_VERZ_MY=20
, =
=20
&<BR> =20
DAT_INNAME &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
&<BR> from=20
CONTRACT_GEG &=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; =20
&<BR> where CONTRACTNR =3D=20
2002017030 &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; =20
&<BR> union  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; =20
&<BR>select CONTRACTNR , 1 as CALC_BASIS_VOLGNR , NAWNR_VERZ_MY=20
, &<BR> '' as DAT_INNAME=20
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; =20
&<BR> from=20
BESTEL_GEG &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p; =20
&<BR> where CONTRACTNR =3D=20
2002017030 &nb=
sp; &nbs=
p; =20
</FONT></SPAN></DIV>
<DIV><FONT color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><SPAN class=3D995024214-07032002><FONT color=3D#0000ff =
size=3D2>access=20
CURSOR_INVERZEKERING</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> Fry, Mark=20
[mailto:Mark.Fry@COGNOS.com]<BR><B>Sent:</B> donderdag 7 maart 2002=20
15:20<BR><B>To:</B> 'bert.dn@arma.nl'; PH =
listserver<BR><B>Subject:</B> RE:=20
Add Null value to cursor<BR><BR></FONT></DIV>
<P><FONT size=3D2>Hi Bert,</FONT> </P>
<P><FONT size=3D2>Hmmm - in your example, the cursor you declare =
(CURSOR_TEST)=20
is not the cursor you are accessing (CURSOR_INVERZEKERING), but =
besides that,=20
give the following a try...</FONT></P>
<P><FONT size=3D2>sql in AL_DB declare CURSOR_TEST cursor=20
for &</FONT> =
<BR><FONT size=3D2>select CONTRACTNR , NAWNR , '' as=20
=
test &nb=
sp; =20
&</FONT> <BR><FONT size=3D2> from=20
=
CONTRACT_GEG &=
nbsp; &n=
bsp; =20
&</FONT> <BR><FONT size=3D2> where CONTRACTNR =3D =
2002017030</FONT> </P>
<P><FONT size=3D2>access CURSOR_TEST</FONT> </P>
<P><FONT size=3D2>Best regards,</FONT> </P>
<P><FONT size=3D2>Mark Fry</FONT> <BR><FONT size=3D2>Cognos =
Limited</FONT>=20
<BR><FONT size=3D2>email: Mark.Fry@Cognos.com</FONT> </P>
<P><FONT size=3D2>Cognos Limited</FONT> <BR><FONT size=3D2>Registered =
in England,=20
number 1635598. Registered office: Westerly Point, Market =
Street,=20
Bracknell, Berkshire, RG12 1QB</FONT></P><BR>
<P><FONT size=3D2>-----Original Message-----</FONT> <BR><FONT =
size=3D2>From:=20
bert.dn@arma.nl [<A=20
href=3D"mailto:bert.dn@arma.nl">mailto:bert.dn@arma.nl</A>]</FONT> =
<BR><FONT=20
size=3D2>Sent: 07 March 2002 14:01</FONT> <BR><FONT size=3D2>To: PH=20
listserver</FONT> <BR><FONT size=3D2>Subject: RE: Add Null value to=20
cursor</FONT> </P><BR>
<P><FONT size=3D2>Hi all,</FONT> </P><BR>
<P><FONT size=3D2>In a cursor (Oracle) I would like to add an =
extra column=20
with value "NULL"</FONT> </P>
<P><FONT size=3D2>As NULL is a reserved word I need to enclose it in =
double=20
quotes ( Yes,I did</FONT> <BR><FONT size=3D2>RTFM!)</FONT> <BR><FONT=20
size=3D2>However PH keep complaining that the column cannot be =
found.</FONT>=20
</P>
<P><FONT size=3D2>sql in AL_DB declare CURSOR_TEST cursor=20
for &</FONT> =
<BR><FONT size=3D2>select CONTRACTNR , NAWNR , "NULL" as=20
test =
&</FONT>=20
<BR><FONT size=3D2> from=20
=
CONTRACT_GEG &=
nbsp; &n=
bsp; =20
&</FONT> <BR><FONT size=3D2> where CONTRACTNR =3D =
2002017030</FONT> </P>
<P><FONT size=3D2>access CURSOR_INVERZEKERING</FONT> </P>
<P><FONT size=3D2>*E* Error parsing SQL statement.</FONT> <BR><FONT=20
size=3D2>DMS-E-GENERAL, A general exception has occurred during =
operation=20
'prepare</FONT> <BR><FONT size=3D2>request'.</FONT> <BR><FONT=20
size=3D2>DMS-E-RBI_COLUMN, Column NULL was not found.</FONT> </P><BR>
<P><FONT size=3D2>When I do this directly in SQL there is no =
problem.</FONT>=20
</P>
<P><FONT size=3D2>Any suggestions?</FONT> </P>
<P><FONT size=3D2>Bert de Nooij</FONT> </P><BR><BR><BR>
<P><FONT size=3D2>=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D</FONT>=20
<BR><FONT size=3D2>Mailing list: powerh-l@lists.swau.edu</FONT> =
<BR><FONT=20
size=3D2>Subscribe: "subscribe" in message body to=20
powerh-l-request@lists.swau.edu</FONT> <BR><FONT size=3D2>Unsubscribe: =
"unsubscribe" in message body to =
powerh-l-request@lists.swau.edu</FONT>=20
<BR><FONT size=3D2><A target=3D_blank=20
=
href=3D"http://lists.swau.edu/mailman/listinfo/powerh-l">http://lists.swa=
u.edu/mailman/listinfo/powerh-l</A></FONT>=20
<BR><FONT size=3D2>This list is closed, thus to post to the list you =
must be a=20
subscriber.</FONT> </P>
<P><FONT size=3D2>This message may contain privileged and/or =
confidential=20
information. If you have received this e-mail in error or are =
not the=20
intended recipient, you may not use, copy, disseminate or distribute =
it; do=20
not open any attachments, delete it immediately from your system and =
notify=20
the sender promptly by e-mail that you have done so. Thank=20
you.</FONT></P></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0006_01C1C5F1.7CD6B2C0--