C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




oracle update query


Posted Date: 06 Jul 2008      Total Responses: 2

Posted By: MehKarim       Member Level: Silver     Points: 1



Hi,

i have a problem while updating and displaying the value.

i wrote a procedure with name seqno as below::
CREATE OR REPLACE PROCEDURE TTDBA.SEQNO
(
SEQUENCENUMBER OUT CONTROLMASTER.SEQUENCENUMBER%TYPE
)
IS
BEGIN
SELECT SEQ_SEQNO.NEXTVAL INTO SEQUENCENUMBER FROM DUAL ;
END SEQNO;

My problem is i have a package in which i need to use this sequencenumber
value.

i am using the procedure(in package body)

PROCEDURE CONTROLMASTER_UPDATE(
SEQUENCENUMBER_OUT OUT CONTROLMASTER.SEQUENCENUMBER%TYPE)
IS
BEGIN
SELECT SEQ_SEQNO.NEXTVAL INTO SEQUENCENUMBER_OUT FROM DUAL ;
UPDATE CONTROLMASTER
SET CONTROLMASTER.SEQUENCENUMBER = SEQUENCENUMBER_OUT ( here i need the seqno procedure value to be taken)
WHERE CONTROLMASTERID = '0000000030';
END CONTROLMASTER_UPDATE;

currently if seqno is 7 then i am getting it 6.
Pls Help very very urjent...
and also correct my query..





Responses

Author: Mohammed Khaja Najmuddin    06 Jul 2008Member Level: GoldRating:     Points: 2

not sure but most of the time ,the above code works fine for u.
please check seqno using sequence.currval may u get some thing



Author: Gaurav Agrawal    06 Jul 2008Member Level: DiamondRating:     Points: 3

Register urself on this site for earning money by using this link

http://www.rupeemail.in/rupeemail/invite.do?in=MTAxNTM0JSMlS0hqblZtUFI0c3BmTmw2azNNVDhyb1dCaA==

GA



Post Reply
You must Sign In to post a response.
Next : generate id in sql server 2005
Previous : update multiple query in sqlsever 2005
Return to Discussion Forum
Post New Message
Category: SQL Server

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use