This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1ECF9.F6EA3300
Content-Type: text/plain
Hi Darren,
I found the example below, hope it helps,
************
Description:
What is the necessary syntax for extracting an Oracle generated sequence
into a TEMPORARY variable in Quick ?
Solution:
First you must create an Oracle Stored Procedure to process the sequence and
return the current value of the sequence. You then must call the stored
procedure from within Quick as in the example below.
stored procedure syntax is below,
create or replace procedure x (kount out number) as
begin
select (seq_order.currval) into kount from dual;
insert into mytable (table_index_field) values (seq_order.nextval);
commit;
end;
/
Below is the procedural code to call the Oracle Stored Procedure which
includes an info to display the sequence value returned to the temporary
item:
screen myscr
stuff ...
temp kount numeric
more stuff ...
proc internal getk ; could be a designer
begin
sql in mydb call x(kount out)
info = ascii( kount ) now response
end
-----Original Message-----
From: Darren Reely [mailto:darren.reely@latticesemi.com]
Sent: 25 April 2002 19:30
To: 'powerh-l@lists.swau.edu'
Subject: Oracle Sequence Numbers
Hi all,
Is there anyway to implement the following cursor so I can have the
database return a sequence number.
sql in mfg declare myseq cursor for &
select trays_seq.nextval from dual
cursor myseq designer
Platform:
Using PH 8.13.D1
Solaris
Oracle 7.3.4.4.0
Darren,
Thank you.
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
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_001_01C1ECF9.F6EA3300
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
RE: Oracle Sequence Numbers
Hi Darren,
I found the example below, hope it helps,
************
Description:
What is the necessary syntax for extracting an Oracle =
generated sequence into a TEMPORARY variable in Quick ?
Solution:
First you must create an Oracle Stored Procedure to =
process the sequence and return the current value of the sequence. You =
then must call the stored procedure from within Quick as in the example =
below.
stored procedure syntax is below,
create or replace procedure x (kount out number) =
as
begin
select (seq_order.currval) into kount from =
dual;
insert into mytable (table_index_field) values =
(seq_order.nextval);
commit;
end;
/
Below is the procedural code to call the Oracle =
Stored Procedure which includes an info to display the sequence value =
returned to the temporary item:
screen myscr
stuff ...
temp kount numeric
more stuff ...
proc internal getk ; could be a =
designer
begin
sql in mydb call x(kount out)
info =3D ascii( kount ) now response
end
-----Original Message-----
From: Darren Reely [mailto:darren.reely@lattice=
semi.com]
Sent: 25 April 2002 19:30
To: 'powerh-l@lists.swau.edu'
Subject: Oracle Sequence Numbers
Hi all,
Is there anyway to implement the following cursor so =
I can have the
database return a sequence number.
sql in mfg declare myseq cursor for &
select =
trays_seq.nextval from dual
cursor myseq designer
Platform:
Using PH 8.13.D1
Solaris
Oracle 7.3.4.4.0
Darren,
Thank you.
=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
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_001_01C1ECF9.F6EA3300--