Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,169,749 members, 7,875,870 topics. Date: Sunday, 30 June 2024 at 12:12 AM

Oracle Stored Procedure - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Oracle Stored Procedure (4874 Views)

Why Is Data Stored And Not Information. / How To Implement Realtime And Dynamic Payment Procedure. / Writing A Function Procedure VB.NET Retrieve Data From Microsoft Access (2) (3) (4)

(1) (Reply) (Go Down)

Oracle Stored Procedure by Bamstand(m): 8:00pm On Nov 17, 2007
any idea on how to create stored procedure in oracle for beginners, and also how to call them out by php
Re: Oracle Stored Procedure by Kobojunkie: 4:00pm On Nov 18, 2007
Re: Oracle Stored Procedure by Bamstand(m): 4:22pm On Nov 18, 2007
thanks pal, but I saw something on that link too,
but the problem is that, I have a databse already and the procedure as also been created
How can I call out 4 fields with a single input in the oracle database that I have.
Assuming I have field A,b,c,d.
I want a situatioin if, I enter a it should bring out the field A,b,c,d and if field A doesnt exist it should return 0.
Thanks for your response I do appreciate and I look foward to answering your questions to soonest.
Pls stay connected
Re: Oracle Stored Procedure by Kobojunkie: 4:30pm On Nov 18, 2007
Post the Procedure you have already so I can see then cause there is really no way for me to understand your post without knowing what you have already. Anyways, for already existing StoredProcedures, you use the ALTER keyword to modify the stored procedure

ALTER procedure NAMEOFSTOREDPROCEDURE
@PARAMETERA int

as

IF @PARAMETERA NOT NULL AND @PARAMETERA >0
BEGIN
SELECT * FROM TABLENAME
END

ELSE
RETURN 0
Re: Oracle Stored Procedure by Bamstand(m): 4:41pm On Nov 18, 2007
let's assume the fields as not yet been created or use
create procedure or replace

pls use the field A,field B, field C, Filed D assuming these are your fields that contain your record, how will it be fixed in the program.

and assuming u want to test the program in sql*plus which variable should I enter how will it be done.

Pls check your hotmail for the error page and the desc of the procedure.
thanks
Re: Oracle Stored Procedure by Kobojunkie: 4:44pm On Nov 18, 2007
You will have to explain more please.

When you say A. B. C. D , I am assuming that those are Column Fields in your table,  right ?? YOu have a table with four columns, A, B, C, D,  Are you trying to do a SELECT or an INSERT

I don't see any of your mails in my hotmail address yet.
Re: Oracle Stored Procedure by Bamstand(m): 4:46pm On Nov 18, 2007
pls can u check your hotmail box for the error page.
Thanks a million
Re: Oracle Stored Procedure by Bamstand(m): 4:55pm On Nov 18, 2007
Yes it's a select statement,(I ALREADY HAVE THE SELECT STATMENT THAT COULD BRING THEM OUT IN ORACLE)i.e. where Field A= true or found then display the 4 fields
meaningsadIN SQLPLUS)When I supply enter the input value A, then the 3output value would be diplayed out.
Re: Oracle Stored Procedure by Kobojunkie: 5:04pm On Nov 18, 2007
I need to see the GETCUSTOMERINFO
Re: Oracle Stored Procedure by Bamstand(m): 5:08pm On Nov 18, 2007
I'm not connected to the dbase, but assuming I am to overwrite,because I was told to write another one by tomorrow morning.
let's assume of declaring new variables
Re: Oracle Stored Procedure by Bamstand(m): 5:22pm On Nov 18, 2007
pls assuming I am to paste the Input eg. it/000999/sl and the 3 declared variables it should bring the 4 output values, and if values does not exist it should return 0 if it exist it should return 1
pls I would check your response in the next 10mins my battery is low.
thanks
Re: Oracle Stored Procedure by Kobojunkie: 5:50pm On Nov 18, 2007
How many parameters do you send in 3


From the image you sent me

DECLARE @Paid_Date as Date,
DECLARE @BALANCE as Number,
DECLARE @RETURN_CD as Number,
DECLARE @RETURNVALUE as Number


EXEC @RETURNVALUE = insweb.GetCustomerInfo POL_KEYVALUE, QUERYFLAGVALUE,BALANCE OUTPUT, @Paid_Date OUTPUT, RETURN_CD OUTPUT

SELECT @BALANCE AS BALANCE, @PAID_DATE AS PAID_DATE,@RETURN_CD as RETURN_CD
Re: Oracle Stored Procedure by Bamstand(m): 8:13pm On Nov 18, 2007
where will I enter all my select statement
Re: Oracle Stored Procedure by Kobojunkie: 8:17pm On Nov 18, 2007
This is not for select statement . I looked at the sample you sent me and used the information to come up with that execute statement. This is from what I understand from what you said. You do not have access to the code for the GetCustomerInfo storeprocedure. so what you need to do is write an execute statement which you can add to a store procedure and then execute it that way. that is what I wrote down there for you. Just create a stored procedure, add that code below to it as the code and then execute your new storedproc, but first, try it in analyser to be sure it is current
Re: Oracle Stored Procedure by Bamstand(m): 8:22pm On Nov 18, 2007
u said analyzer,pls what are the procedures?
Re: Oracle Stored Procedure by Kobojunkie: 8:29pm On Nov 18, 2007
Re: Oracle Stored Procedure by Bamstand(m): 8:33pm On Nov 18, 2007
have u seen the code I sent?
So in the code u sent, I would key it in sqlplus right?
Re: Oracle Stored Procedure by Kobojunkie: 8:42pm On Nov 18, 2007
I am not using SQLPLUS , but SQL, Did you test the code and it did not work??

I am on Yahoo messenger

(1) (Reply)

I Want To Hire A Beginner Who Is Willing To Learn New Skills / Which Laptop Is Most Suitable For Learning Programming For Beginners? / Mathematics As Backbone Of Programming

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 29
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.