Results 1 to 3 of 3
  1. #1
    Join Date
    May 2013
    Posts
    2

    Unanswered: How to change PL/SQL or T-SQL procedures into ACCESS function?

    HI... I 've been trying to change/convert this into an ACCESS function.
    Never worked with it. I have SQL*Plus from ORACLE.
    How to write in access? Any reference/topic I could read to do it? I am clueless. I will appreciate any help. Thanks.


    Obtain the name and credit limit of the customer whose number currently is stored in I_CUSTOMER_NUM. Place these values in the variables I_CUSTOMER_NAME and I_CREDIT_LIMIT, respectively. Output the contents of I_CUSTOMER_NAME and I_CREDIT_LIMIT.


    This is the PL/SQL or T-SQL procedure I wrote:

    Code:
    	CREATE OR REPLACE PROCEDURE DISP_ORDER_NUM
    	(I_ORDER_NUM IN ORDERS.ORDER_NUM%TYPE) AS
    	I_ORDER_DATE ORDERS.ORDER_DATE%TYPE;
    	I_CUSTOMER_NUM CUSTOMER.CUSTOMER_NUM%TYPE;
    	I_CUSTOMER_NAME CUSTOMER.CUSTOMER_NAME%TYPE;
    
    	BEGIN
    	SELECT ORDER_DATE, CUSTOMER_NUM, CUSTOMER_NAME
    	INTO I_ORDER_DATE, I_CUSTOMER_NUM, I_CUSTOMER_NAME
    	FROM ORDERS, CUSTOMER
    	WHERE ORDER_NUM = I_ORDER_NUM
    	AND ORDERS.CUSTOMER_NUM = CUSTOMER.CUSTOMER_NUM;
    
    	DBMS_OUTPUT.PUT_LINE(I_ORDER_DATE, I_CUSTOMER_NUM, I_CUSTOMER_NAME);
    
    	END;
    	/

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    either write a stored CREATE PROC
    OR
    use conventional recordset
    OR
    use a class module and expose the custoemr number and name as properties
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    May 2013
    Posts
    2
    Quote Originally Posted by healdem View Post
    either write a stored CREATE PROC
    OR
    use conventional recordset
    OR
    use a class module and expose the custoemr number and name as properties

    Thank you very much, I googled your answer. That's what I've been looking for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •