Problem with a stored procedure to search in a table

h5.
Hi,
h5.
As many people on the forum, I'm new on PL/SQL programming.
h5.
I'm trying to program a stored procedure that allow to search on my table fields with different parameters.
h5.
All this parameters doesn't need to be set, at least one.
h5.
I'm looking for the solution from 2 weeks ago.
h5.
I have looked everywhere
h5.
Could someone help me, please??
h5.
Here is my code:
* HERE WE CREATE PACKAGE FOR THE CURSOR
create or replace
PACKAGE HOTEL_DEST_PKG
IS
/* Define the REF CURSOR type. */
TYPE HOTEL_DEST_TYPE IS REF CURSOR;
END HOTEL_DEST_PKG;
* HERE WE CREATE OUR STORE PROCEDURE TO SEARCH
create or replace
PROCEDURE Search_Hotel (
IdDocument IN number,
MyFilter IN VARCHAR2,
IdCountry IN number,
DepartureDateFirst IN DATE,
DepartureDateSecond IN DATE,
HD_Cursor OUT HOTEL_DEST_PKG.HOTEL_DEST_TYPE)
IS
SQL_REQ VARCHAR2(5000);
BEGIN
/* all columns were entered */
IF ((IdDocument > 0) OR
((MyFilter IS NOT NULL) AND (length(MyFilter) > 0)) OR
(IdCountry > 0) OR
(DepartureDateFirst IS NOT NULL) OR
(DepartureDateSecond IS NOT NULL))
THEN
SQL_REQ := 'SELECT HOTEL_DESTINATION.*
FROM HOTEL_DESTINATION
WHERE 1=1';
/* Search on the hotel id*/
IF IdDocument > 0 THEN
SQL_REQ := SQL_REQ || ' AND HOTEL_DESTINATION.HD_ID = :IdDocument';
ELSE
SQL_REQ := SQL_REQ || ' AND :IdDocument IS NULL';
END IF;
     /*Search on different indexed fields*/
IF MyFilter IS NOT NULL AND LENGTH(MyFilter)>0 THEN
SQL_REQ := SQL_REQ || ' AND CONTAINS(HOTEL_DESTINATION.HD_FILTER, :MyFilter)';
ELSE
SQL_REQ := SQL_REQ || ' AND :MyFilter IS NULL';
END IF;
/* Search on the hotel country id*/
IF IdCountry > 0 THEN
SQL_REQ := SQL_REQ || ' AND HOTEL_DESTINATION.HD_CN_ID = :IdCountry';
ELSE
SQL_REQ := SQL_REQ || ' AND :IdCountry IS NULL';
END IF;
/* Search on the dates*/
IF DepartureDateFirst IS NOT NULL THEN
SQL_REQ := SQL_REQ || ' AND HOTEL_DESTINATION.HD_DEPARTURE_DATE >= :DepartureDateFirst';
ELSE
SQL_REQ := SQL_REQ || ' AND :DepartureDateFirst IS NULL' ;
END IF;
IF DepartureDateSecond IS NOT NULL THEN
SQL_REQ := SQL_REQ || ' AND HOTEL_DESTINATION.HD_DEPARTURE_DATE <= :DepartureDateSecond';
ELSE
SQL_REQ := SQL_REQ || ' AND :DepartureDateSecond IS NULL';
END IF;
OPEN HD_CURSOR FOR SQL_REQ USING IdDocument,
MyFilter,
IdCountry,
DepartureDateFirst,
DepartureDateSecond;
END IF;
END;
* HERE WE CALL AND EXECUTE OUR STORE PROCEDURE TO SEARCH
* ON WORD
set serveroutput on
DECLARE
     IDDOCUMENT NUMBER;
     MYFILTER VARCHAR2(200);
     IDCOUNTRY NUMBER;
     DEPARTUREDATEFIRST IN DATE;
     DEPARTUREDATESECOND IN DATE;
     HD_CURSOR OUT HOTEL_DEST_PKG.HOTEL_DEST_TYPE);
BEGIN
IDDOCUMENT := 0;
MYFILTER := 'test';
IDCOUNTRY := 0;
DEPARTUREDATEFIRST := NULL;
DEPARTUREDATESECOND := NULL;
SEARCH_HOTEL(
IDDOCUMENT => IDDOCUMENT,
MYFILTER => MYFILTER,
IDCOUNTRY => IDCOUNTRY,
DEPARTUREDATEFIRST => DEPARTUREDATEFIRST,
DEPARTUREDATESECOND => DEPARTUREDATESECOND,
HD_Cursor => HD_Cursor
-- Modify the code to output the variable
--DBMS_OUTPUT.PUT_LINE('HD_Cursor = ' || HD_Cursor);
END;

You need to grant right on the table to the owner of the stored procedure directly (not via Role).
When there are only rights via role everything is fine in sql, but it will not work in stored procedures, functions or packages.
So as Table-Owner do:
grant select on <table> to <procedure, package or function-owner>;Edited by: hm on 22.10.2010 08:49

Similar Messages

  • What is the problem with this Stored Procedure

    Hi ,
    What is the problem with this Stored Procedure ?Why is it giving errors ??
    CREATE or replace  PROCEDURE getEmpName
    *(EMP_FIRST OUT VARCHAR2(255))*
    BEGIN
    SELECT ename INTO EMP_FIRST
    FROM Emp
    WHERE EMPNO = 7369;
    END ;
    */*

    You don't specify precision in procedure arguments.
    (EMP_FIRST OUT VARCHAR2(255))should be
    (EMP_FIRST OUT VARCHAR2)Since you asked what's wrong with it, I could add that it needs formatting and the inconsistent use of upper and lower case is not helping readability.

  • Performance problem with java stored procedure

    hi,
    i developped a java class, then I stored it in Oracle 8.1.7.
    This class contains several import of other classes stored in the database.
    It works, but the execution perfomances are disappointing. It's very long. I guess, that's because of the great number of classes to load that are necessary for my class execution.
    I tried to increase the size of the java pool (I parameter 70 Mo in the java_pool_size parameter of the init.ora), but the performance is not much better.
    Has anyone an idea to increase the performance of this execution of my class ?
    In particular, is there a way to keep permanently in memory the java objects used by my class ?
    Thanks in advance
    bye
    [email protected]
    null

    before running Java, the database session needs to be Java enabled; this might be the reason why it is taking so long. If this is the case, you should see an improvement in subsequent calls, once a database session is Java enabled, other users can benefit from it.
    Kuassi
    I have some performance issue with java stored procedure. Hope some one will be able to help me out. I'm using java stored procedures in my application and basically these procedures are used to do some validation and form the XML message of the database tables. I have noticed that when I call the PL/SQL wrapper function, it is taking time to load the java class and once the class is loaded the execution is faster. Most of the time is spent for loading the class rather than executing the function. if I reduce the class load time, I can improve the performance drastically. Do any one of you know how to reduce the class load time. The following are the platform and oracle version.
    O/S: IBM AIX
    Oracle: 8.1.7

  • Problems with java stored procedure.

    I have a java stored procedure that uses a package called RmiJdbc
    which allows calling remote JDBC data sources from any java capable
    machine.
    I've loaded the RmiJdbc classes into oracle via the loadjava
    command and everything seems to come up valid.
    The stored procedure does a Class.forName() to get the driver
    registered, than attempts to connect to the remote RMI driver.
    The particular line it dies on is this (see the error below):
    c = DriverManager.getConnection("jdbc:rmi:" + rmiHost + "/" + url);
    A mangled version of this (minus the Oracle specific stuff) works
    from the command line correctly. Can somebody point me in a
    direction to figure out what's going on here?
    THanks,
    Eric
    Oracle9i Enterprise Edition Release 9.0.1.3.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.0.1.3.0 - Production
    ORACLE_HOME = /oracle/v901ee
    System name: HP-UX
    Node name: athena
    Release: B.11.00
    Version: A
    Machine: 9000/889
    Instance name: PASDB2
    Redo thread mounted by this instance: 1
    Oracle process number: 13
    Unix process pid: 7839, image: oracle@athena (TNS V1-V3)
    *** SESSION ID:(8.547) 2002-08-15 15:41:27.221
    java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
    java.lang.NullPointerException
    java.lang.NullPointerException
    at sun.rmi.server.LoaderHandler$LoaderKey.<init>(LoaderHandler.java)
    at sun.rmi.server.LoaderHandler.lookupLoader(LoaderHandler.java)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java)
    at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java)
    at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.inputArray(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java)
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java)
    at sun.rmi.registry.RegistryImpl_Stub.lookup
    at org.objectweb.rmijdbc.RJConnection.<init>(RJConnection:83)
    at org.objectweb.rmijdbc.Driver.connect(Driver:135)
    at java.sql.DriverManager.getConnection(DriverManager.java)
    at java.sql.DriverManager.getConnection(DriverManager.java)
    at TurnoverInfoPlusInterface.insertInterfaceRecords(TurnoverInfoPlusInterface:53)
    java.sql.SQLException: Error unmarshaling return; nested exception is:
    java.lang.NullPointerException
    at org.objectweb.rmijdbc.Driver.connect(Driver:140)
    at java.sql.DriverManager.getConnection(DriverManager.java)
    at java.sql.DriverManager.getConnection(DriverManager.java)
    at TurnoverInfoPlusInterface.insertInterfaceRecords(TurnoverInfoPlusInterface:53)

    More info...I'm also seeing "ORA-03113: end-of-file on communication channel". I checked the user trace file and didn't get much help...it indicated an "exception signal: 11" and core-dump type stuff that had no meaning to me.

  • Problem with JDBC stored procedure

    Hi...
    We are implementing an interface from SAP r/3 4.7 to Oracle DB 9.0. On sender side we have used IDOC Adapter and on Receiver side we have used JDBC Adapter.
    Here we are using stored procedures in JDBC Adapter. I have 2 stored procedures(one for header and one for items) and SISCSO.SISCSO01 IDOC.
    Here we are getting following error in RWB for JDBC Receiver adapter....
    <b>Error</b>
    " Receiver Adapter v2112 for Party '', Service 'BS_ORADEV':
    Configured at 2006-08-16 10:12:14 GMT+05:30
    History:
    - 2006-08-16 11:02:04 GMT+05:30: Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PR_SPARES_VOR_PO_HDR_UPLOAD' (structure 'statement'): java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'PR_SPARES_VOR_PO_HDR_UPLOAD' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored ".
    <b>My mapping file is like this.....</b>
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:TVS_MST_SPARES_ORDER xmlns:ns0="urn:tvsmotor:salesorder"><statement><PR_SPARES_VOR_PO_HDR_UPLOAD action="execute"><table>PR_SPARES_VOR_PO_HDR_UPLOAD</table><IN_DEALER_ID isInput="true" type="String">efde</IN_DEALER_ID><IN_SPARE_PO_NO isInput="TRUE" type="STRING">sdfsdf</IN_SPARE_PO_NO><IN_PO_DATE isInput="TRUE" type="STRING">12.12.2555</IN_PO_DATE><IN_ORDER_TYPE isInput="TRUE" type="STRING">23</IN_ORDER_TYPE><IN_REMARKS isInput="TRUE" type="STRING">Remark</IN_REMARKS><IN_SAP_SALE_ORD_NO isInput="TRUE" type="STRING">146546</IN_SAP_SALE_ORD_NO><IN_SAP_SALE_ORD_DT isInput="TRUE" type="STRING">12.12.2555</IN_SAP_SALE_ORD_DT><IN_TOT_VAL isInput="TRUE" type="STRING">2323</IN_TOT_VAL></PR_SPARES_VOR_PO_HDR_UPLOAD><PR_SPARES_VOR_PO_DTL_UPLOAD action="execute"><IN_DEALER_ID isInput="TRUE" type="STRING">efde</IN_DEALER_ID><IN_SPARE_PO_NO isInput="TRUE" type="STRING">sdfsdf</IN_SPARE_PO_NO><IN_PO_DATE isInput="TRUE" type="STRING">12.12.2555</IN_PO_DATE><IN_PART_NO isInput="TRUE" type="STRING">cfgdfw4w</IN_PART_NO><IN_ORDER_QTY isInput="TRUE" type="STRING">2</IN_ORDER_QTY><IN_PENDING_QTY isInput="TRUE" type="STRING">20</IN_PENDING_QTY><IN_RATE isInput="TRUE" type="STRING">2432</IN_RATE><IN_TAX isInput="TRUE" type="STRING">18</IN_TAX></PR_SPARES_VOR_PO_DTL_UPLOAD></statement></ns0:TVS_MST_SPARES_ORDER>
    Please help me out with this error... tell me if more information is required.
    Thanks,
    Audumbar.

    hi mario,
    tell me one thing.... does case metter for stored procedure name? and even for the parameters used in stored procedure?
    i have changed the case of stored procedure name... (its small in Oracle) but have not changed the case of parameters....
    after changing the case also i m getting the following error....
    " Receiver Adapter v2112 for Party '', Service 'BS_ORADEV':
    Configured at 2006-08-16 10:12:14 GMT+05:30
    History:
    - 2006-08-16 14:18:19 GMT+05:30: Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. <b>'pr_spares_vor_po_hdr_upload'</b> (structure 'statement'): java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00201: identifier <b>'PR_SPARES_VOR_PO_HDR_UPLOAD'</b> must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored "
    Reply me as soon as possible.
    Thanx,
    Regards,
    Audumbar
    Message was edited by: Audumbar Pikle

  • Problem with a stored procedure (Error(4,1): PLS-00428: an INTO clause..)

    Dear Oracle Experts,
    I try to use the stored procedure below but get this error :
    "Error(4,1): PLS-00428: an INTO clause is expected in this SELECT statement"
    I don't have any clue what could be wrong with my syntax. INTO wouldn't make any sense at this task.
    Does someone of you know what's wrong with my Procedure ?
    Hope someone can help,
    best regards,
    Daniel Wetzler
    create or replace PROCEDURE AnalysisCompatibility (DATEBEGIN timestamp, DATEEND timestamp)
    AS
    BEGIN
    select Fs.*,Vs.Analysispriority,Vs.Compatibility Compatibility from SigFacts Fs
    inner Join Variables Vs On
    (Fs.Var_Ref=Vs.Var_Ref and Fs.Machines_Ref=Vs.Machines_Ref )
    where Fs.DT between DATEBEGIN and DATEEND
    and
    Vs.AnalysisPriority > 0
    or
    VS.Compatibility in (6,7,8,9,10,11,13,21,22)
    order by Fs.DT,Fs.Machines_Ref desc, Vs.AnalysisPriority;
    END AnalysisCompatibility;

    I have created a table (ATREPORT.TEST) that has has got the same column name and type of the query output and i still get error message
    PLS-00403 -- statement ATreport.TESt cannot be used as an into target, pls help
    DECLARE start_date DATE := to_date('01/09/2006' , 'DD-MON-YYYY');
    end_date DATE := to_date('30/09/2006' , 'DD-MON-YYYY');
    BEGIN
    SELECT t.SEC_SHORT_NAME, t.SEC_ISIN, t.SEC_NO,t.SEC_NAME, t.TRADE_DATE,
    t.PAYMENT_DATE,t.COUNTERPARTY, t.PRICE , t.NOMINAL ,
                        t.TRANSACTION_NO,t.CURRENT_VALUE_PC, t.CURRENT_VALUE_SC, t.PAYMENT_AMOUNT_PC,
                        t.PAYMENT_AMOUNT_SC,
                   ct.AMOUNT , ct.CURRENCY,
              sb.BUSINESS_CLASS_LEVEL_2 ,sb.BUSINESS_CLASS_LEVEL_2_NAME,
              sb.BUSINESS_CLASS_LEVEL_3 ,sb.BUSINESS_CLASS_LEVEL_3_NAME,
              sb.BUSINESS_CLASS_LEVEL_4 ,sb.BUSINESS_CLASS_LEVEL_4_NAME,
    sb.BUSINESS_CLASS_LEVEL_5 ,sb.BUSINESS_CLASS_LEVEL_5_NAME
    INTO ATREPORT.TEST
    from scdat.A_TRANSACTIONS t
    INNER JOIN scdat.A_COSTTAX ct     
         ON ct.TRANS_REF = t.TRANS_REF
    INNER JOIN scdat.A_SECS_BUSINESS_CLASS_TS sb
    ON sb.SEC_REF = t.SEC_REF           
    where t.TRADE_DATE >= to_char(start_date ,'DD-MON-YYYY')
    and t.TRADE_DATE < to_char(end_date ,'DD-MON-YYYY')
    and ct.COST_NAME = 'Broker commission'
    and sb.BUSINESS_CLASS_DEFINITION = 'FTSE';
    END;

  • Perfomance problem with java stored procedure

    hi,
    i developped a java class, then I stored it in Oracle 8.1.7.
    This class contains several import of other classes stored in the database.
    It works, but the execution perfomances are disappointing. It's very long. I guess, that's because of the great number of classes to load that are necessary for my class execution.
    I tried to increase the size of the java pool (I parameter 70 Mo in the java_pool_size parameter of the init.ora), but the performance is not much better.
    Has anyone an idea to increase the performance of this execution of my class ?
    In particular, is there a way to keep permanently in memory the java objects used by my class ?
    Thanks in advance
    bye
    [email protected]
    null

    Hello again,
    I read the documentation of 9i and found some hints about different TCP/IP socket handling of 9i and a standard JVM.
    There are some parts that give hints but I couldn't find a sample code to show how to handle the differences.
    Could anyone tell me how to handle the differences or give some links to sample code?
    Thanks
    Detlev

  • Problem with a Stored Procedure

    I created a SP. My SP is:
    Create or Replace Procedure sp_atualiza(val_ent in number,id_ent in integer)
    as
    begin
    update venda set valor = val_ent*valor
    where id_venda = id_ent;
    end sp_atualiza;
    Now into SQL*Plus I write:
    SQL>execute sp_atualiza(1.5,3)
    The message is: Procedure PL/SQL sucessfully(My windows is in Portuguese and I don't known to translate in english this message so well).
    If i run into Home XE, this message is: Invalid SQL statement.
    How can I do run a SP into Home and SQL*Plus of the XE?

    Bom Dia!
    EXECUTE is a SQL*Plus command - it doesn't work in most other tools (though some like TOAD do recognize it).
    In a pure SQL tool, you need to provide a true SQL or PL/SQL statement:
    BEGIN
       SP_ATUALIZA(1.5, 3);
    END;
    /I hope that helps
    Regards Nigel

  • Need Help With a Stored Procedure

    Help With a Stored Procedure
    Hi everyone.
    I am quite new relative to creating stored procedures, so I anticipate that whatever help I could get here would be very much helpful.
    Anyway, here is my case:
    I have a table where I need to update some fields with values coming from other tables. The other tables, let us just name as tblRef1, tblRef2 and tblRef3. For clarity, let us name tblToUpdate as my table to update. tblToUpdate has the following fields.
    PlanID
    EmployeeIndicator
    UpdatedBy
    CreatedBy
    tblRef1, tblRef2 and tblRef3 has the following fields:
    UserName
    EmpIndicator
    UserID
    In my stored procedure, I need to perform the following:
    1. Check each row in the tblToUpdate table. Get the CreatedBy value and compare the same to the UserName and UserID field of tblRef1. If no value exists in tblRef1, I then proceed to check if the value exists in the same fields in tblRef2 and tblRef3.
    2. If the value is found, then I would update the EmployeeIndicator field in tblToUpdate with the value found on either tblRef1, tblRef2 or tblRef3.
    I am having some trouble writing the stored procedure to accomplish this. So far, I have written is the following:
    CREATE OR REPLACE PROCEDURE Proc_Upd IS v_rec NUMBER;
    v_plan_no tblToUpdate.PLANID%TYPE;
    v_ref_ind tblToUpdate.EMPLOYEEINDICATOR%TYPE;
    v_update_user tblToUpdate.UPDATEDBY%TYPE;
    v_created_by tblToUpdate.CREATEDBY%TYPE;
    v_correct_ref_ind tblToUpdate.EMPLOYEEIDICATOR%TYPE;
    CURSOR cur_plan IS SELECT PlanID, EmployeeIndicator, UPPER(UpdatedBy), UPPER(CreatedBy) FROM tblToUpdate;
    BEGIN
    Open cur_plan;
         LOOP
         FETCH cur_plan INTO v_plan_no, v_ref_ind, v_update_user, v_created_by;
              EXIT WHEN cur_plan%NOTFOUND;
              BEGIN
              -- Check if v_created_by has value.
                   IF v_created_by IS NOT NULL THEN
                   -- Get the EmpIndicator from the tblRef1, tblRef2 or tblRef3 based on CreatedBy
                   SELECT UPPER(EmpIndicator)
                        INTO v_correct_ref_ind
                        FROM tblRef1
                        WHERE UPPER(USERNAME) = v_created_by
                        OR UPPER(USERID) = v_created_by;
                        IF v_correct_ref_ind IS NOT NULL THEN
                        -- Update the Reference Indicator Field in the table TRP_BUSPLAN_HDR_T.
                             UPDATE TRP_BUSPLAN_HDR_T SET ref_ind = v_correct_ref_ind WHERE plan_no = v_plan_no;
                        ELSIF
                        -- Check the Other tables here????
                        END IF;
                   ELSIF v_created_by IS NULL THEN
                   -- Get the EmpIndicator based on the UpdatedBy
                        SELECT UPPER(EmpIndicator)
                        INTO v_correct_ref_ind
                        FROM tblRef1
                        WHERE UPPER(USERNAME) = v_update_user
                        OR UPPER(USERID) = v_created_by;
                        IF v_correct_ref_ind IS NOT NULL THEN
                        -- Update the Reference Indicator Field in the table TRP_BUSPLAN_HDR_T.
                             UPDATE TRP_BUSPLAN_HDR_T SET ref_ind = v_correct_ref_ind WHERE plan_no = v_plan_no;
                        ELSIF
                        -- Check the Other tables here????
                        END IF;
                   END IF;
              END;
         END LOOP;
         CLOSE cur_plan;
         COMMIT;
    END
    Please take note that the values in the column tblToUpdate.UpdatedBy or tblToUpdate.CreatedBy could match either the UserName or the UserID of the table tblRef1, tblRef2, or tblRef3.
    Kindly provide more insight. When I try to execute the procedure above, I get a DATA NOT FOUND ERROR.
    Thanks.

    Ah, ok; I got the updates the wrong way round then.
    BluShadow's single update sounds like what you need then.
    I also suggest you read this AskTom link to help you see why you should choose to write DML statements before choosing to write cursor + loops.
    In general, when you're being asked to update / insert / delete rows into a table or several tables, your first reaction should be: "Can I do this in SQL?" If you can, then putting it into a stored procedure is usually just a case of putting the sql statement inside the procedure header/footers - can't really get much more simple than that! *{;-)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to verify the user information pass by the form with a stored procedure?

    Hi,
    I would like to know how to verify user information pass by the form with a stored procedure.
    I want make a portal which accepts to new user registration, but I want verify the new user's informations (like the name don't contain a number etc).
    Thanks for your help
    regards
    jla

    Hi Samson,
    You can use the UI API to do this. You can catch the form_ADD event and then validate the input from the users. You can even block the event from completing (and stop the document from being added) if your code finds some incorrect data using the bubbleEvent functionality.
    I don't have one specific example to show you, but if you look at some of the SDK samples (for example C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\02.CatchingEvents) to see how to work with events, you can then create your own validation to ensure the users data is valid.
    Regards,
    Niall

  • How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so many hours.

    How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so
    many hours.

    How big is the table on server B? Is that possible to bring the all data into a server A and merge the data locally?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every 4 hours.

    How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so many hours.

    Hello,
    If you had configure server2 as
    linked server on the server1, you can run the following statement inside stored proceduce to copy table data. And then create a job to the run stored proceduce every 4 hours.
    Insert Into Server2.Database2.dbo.Table2
    (Cols)
    Select Cols From Server1.Database1.dbo.Table1
    Or you can use the SQL Server Import and Export Wizard to export the data from server1 to server2, save the SSIS package created by the wizard on the SQL Server, create a job to run the SSIS package. 
    Reference:http://technet.microsoft.com/en-us/library/ms141209.aspx
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Problem with my iTunes store, cannot search, stays in one application that I already purchased. Please help!

    Problem with my iTunes store, cannot search, stays in one application that I already purchased. Please help!

    Go to Settings, Store, Apple ID, Sign out and then sign back in again and have another go.
    Also, try a Reset [Hold the Home and Sleep/Wake buttons down together for 10 seconds or so (until the Apple logo appears) and then release. The screen will go blank and then power ON again in the normal way.] It is app and data safe!

  • Can I create a Stored Procedure That access data from tables of another servers?

    I'm developing a procedure and within it I'm trying to access another server and make a select into a table that belongs to this another server. When I compile this procedure I have this error message: " PLS-00904: insufficient privilege to access object BC.CADPAP", where BC.CADPAP is the problematic table.
    How can I use more than one connection into an Oracle Stored Procedure?
    How I can access tables of a server from a Stored Procedure since the moment I'm already connected with another server?
    Can I create a Stored Procedure That access data from tables of another servers?

    You need to have a Database Link between two servers. Then you could do execute that statement without any problem. Try to create a database link with the help of
    CREATE DATABASE LINK command. Refer Document for further details

  • Writing a stored procedure to import SQL Server table data into a Oracle table

    Hello,
    As a new DBA I have been tasked with writing a stored procedure to import SQL Server table data into an Oracle table. I have been given many suggestions on how to do it from SQL Server but I I just need to write a stored procedure to run it from the Oracle side. Suggestions/guidance on where to start would be greatly appreciated! Thank you!
    I started to write it based on what I have but I know this is not correct :/
    # Here is the select statement for the data source in SQL Server...
    SELECT COMPANY
    ,CUSTOMER
    ,TRANS_TYPE
    ,INVOICE
    ,TRANS_DATE
    ,STATUS
    ,TRAN_AMT
    ,CREDIT_AMT
    ,APPLD_AMT
    ,ADJ_AMT
    ,TRANS_USER1
    ,PROCESS_LEVEL
    ,DESCRIPTION
    ,DUE_DATE
    ,OUR_DATE
    ,OUR_TIME
    ,PROCESS_FLAG
    ,ERROR_DESCRIPTION
      FROM data_source_table_name
    #It loads data into the table in Oracle....   
    Insert into oracle_destination_table_name (
    COMPANY,
    CUSTOMER,
    TRANS_TYPE,
    INVOICE,
    TRANS_DATE,
    STATUS,
    TRANS_AMT,
    CREDIT_AMT,
    APPLD_AMT,
    ADJ_AMT,
    TRANS_USER1,
    PROCESS_LEVEL,
    DESCRIPTION,
    DUE_DATE,
    OUR_DATE,
    OUR_TIME,
    PROCESS_FLAG,
    ERROR_DESCRIPTION)
    END;

    CREATE TABLE statements would have been better as MS-SQL and Oracle don't have the same data types.
    OUR_DATE, OUR_TIME will (most likely) be ONE column in Oracle.
    DATABASE LINK
    Personally, I'd just load the data over a database link:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_table@mssql_db_link
    As far as creating the database link from Oracle to MS-SQL ... that is for somebody else to answer.
    (most likely you'll need to use an ODBC driver)
    EXTERNAL TABLE
    If the data from MS-SQL is in a CSV file, just use and external table.
    same concept:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_external_table
    MK

Maybe you are looking for

  • I am unable to download itunes on 32 bit Vista home premium

    I had an older version 9 of Itunes on my Vista 32 bit home premium windows pc and has acquired the latest ios 6 Ipod touch but Itunes dows not recognise it and I was unable to sync it. The itouch driver installed on pc and a message comes comes up sh

  • Help required in Reading smartform

    Hi Everyone,                  Can any one please tell me if there is any function module to read a smartform and its nodes. Function module READ_FORM is there for reading the scripts. Is there any similar function module to read smartforms. Awaiting

  • Lsgrp - list all members of a group

    lsgrp is a small and fast utility written in C that does just one thing: it lists the members of a group. It can be used in scripts that need to do something for each user in a group, such as setting up directories or generating per-user configuratio

  • 27" iMac i7 system noises/hash out of the analog headphone jack.

    Anybody have any info on the cause of this noise?? My 27" iMac i7 emits some sort of system noise out of the ANALOG headphone jack when hooked up to external powered speakers or mixing board. I thought it might be be some sort of grounding issue, sin

  • KM Document: edit locally - error occured "Operation Failed"

    Hi everyone! I am runnig SAP NetWeaver Portal 7.0 with MS Internet Explorer 7.0. I am trying to edit documents locally from the KM. Unfortunately it doesn´t work. Error occured "Operation Failed". I think all ActivX settings in the web browser are co