Procedure for select command

Can any one please tell me how to create a procedure for this query "Select * from <table_name>"?
I have tried in oracal 10g its throws the error."PLS-00428: an INTO clause is expected in this SELECT statement".
In sql server we can go and directly put the select statement in procedure. but i dont know why it is throwing error in oracle.

>
Can any one please tell me how to create a procedure for this query "Select * from <table_name>"?
I have tried in oracal 10g its throws the error."PLS-00428: an INTO clause is expected in this SELECT statement".
In sql server we can go and directly put the select statement in procedure. but i dont know why it is throwing error in oracle.
>
In Oracle you have to specify where to put the results of the query, nothing is provided by default.
set serveroutput on;
declare
  type my_type is table of emp%rowtype;
  my_emp my_type;
begin
  select * bulk collect into my_emp from emp;
  for i in my_emp.first..my_emp.last
  loop
    dbms_output.put_line(my_emp(i).empno);
  end loop;
end;
7369
7499
7521
7566
7654
7698
7782
7788
7839
7844
7876
7900
7902
7934You can test this example in the SCOTT schema and then put the code into a procedure if you want.
See 5 Using PL/SQL Collections and Records in the PL/SQL Language doc for details and more examples.
http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/collections.htm

Similar Messages

  • All option for selection command

    Once you have selected multiple items how do you move them as one? I have looked thru the sample scripts, Adobe PDF's and the user postings without any luck. Below is the sample script with the line - myInDesign.Selection.item(1).move Array(5, 5) that I have the question on. This line only moves the first selection and not all.
    Thanks,
    Archie
    For I = 1 to myDocument.PageItems.Count
    X1=17
    Y1=18
    X2=47
    Y2=33
    myItemType = TypeName(myDocument.PageItems.Item(I))
    REM MsgBox "Counter: " & cStr(I) & " Type: " & myItemType
    Set myCurrentObject = myDocument.PageItems.Item(I)
    myBounds = myCurrentObject.GeometricBounds
    myY1 = myBounds(0)
    myX1 = myBounds(1)
    myY2 = myBounds(2)
    myX2 = myBounds(3)
    If myX1 >= X1 - 1 and myY1 >= Y1 - 1 and myX2 <= X2 + 1 and myY2 <= Y2 + 1 Then
    myGroupCounter = myGroupCounter + 1
    MyDocument.Select myCurrentObject, idSelectionOptions.idAddTo
    End If
    Next
    If myGroupCounter > 0 Then
    ** this line ** myInDesign.Selection.item(1).move Array(5, 5)
    End If

    I need to select all objects in the area (could be text, plus a border, or text plus graphic lines, or text with a image, etc.) that makes up the stamp, move that selection of objects to another document, then reduce it to fit on a die cut label. This script is for a document that contains 8 stamps per page. I think I have it working now. Below is the section of code I have been using to test this.
    Thanks,
    Archie
    Rem GROUP
    Rem -----
    Function myGroup (myInDesign, myDocument)
    myLabelPercent = .73
    For I = 1 to myDocument.PageItems.Count
    X1=17
    Y1=18
    X2=47
    Y2=33
    myItemType = TypeName(myDocument.PageItems.Item(I))
    Set myCurrentObject = myDocument.PageItems.Item(I)
    myBounds = myCurrentObject.GeometricBounds
    myY1 = myBounds(0)
    myX1 = myBounds(1)
    myY2 = myBounds(2)
    myX2 = myBounds(3)
    If myX1 >= X1 - 1 and myY1 >= Y1 - 1 and myX2 <= X2 + 1 and myY2 <= Y2 + 1 Then
    myGroupCounter = myGroupCounter + 1
    MyDocument.Select myCurrentObject, idSelectionOptions.idAddTo
    End If
    Next
    If myGroupCounter > 0 Then
    Set myGroup = myDocument.Groups.Add(myDocument.Selection)
    myGroup.move Array (10, 10)
    set myScaleMatrix = myInDesign.TransformationMatrices.Add(cDbl(myLabelPercent), cDbl(myLabelPercent))
    myGroup.Transform idCoordinateSpaces.idPasteboardCoordinates,idAnchorPoint.idCenterAnchor,
    myScaleMatrix
    MyDocument.Select idNothingEnum.idNothing
    End If
    End Function

  • Stored Procedures for Simple SQL statements

    Hi Guys,
    We are using Oracle 10g database and Web logic for frontend.
    The Product is previously developed in DotNet and SQL Server and now its going to develop into Java (Web Logic) and Oracle 10g database.
    Since the project is developed in SQL Server, there are lot many procedures written for simple sql queries. Now I would like to gather your suggestions / pointers on using procedures for simple select statements or Inserts from Java.
    I have gathered some list for using PL/SQL procedure for simple select queries like
    Cons
    If we use procedures for select statements there are lot many Ref Cursors opened for Simple select statements (Open cursors at huge rate)
    Simple select statements are much faster than executing them from Procedure
    Pros
    Code changes for modifying select query in PL/SQL much easier than in Java
    Your help in this regard is more valuable. Please post your points / thoughts here.
    Thanks & Regards
    Srinivas
    Edited by: Srinivas_Reddy on Dec 1, 2009 4:52 PM

    Srinivas_Reddy wrote:
    Cons
    If we use procedures for select statements there are lot many Ref Cursors opened for Simple select statements (Open cursors at huge rate)No entirely correct. All SQLs that hit the SQL engine are stored as cursors.
    On the client side, you have an interface that deals with this SQL cursor. It can be a Java class, a Delphi dataset, or a PL/SQL refcursor.
    Yes, cursors are created/opened at a huge rate by the SQL engine. But is is capable of doing that. What you need to do to facilitate that is send it SQLs that uses bind variables. This enables the SQL engine to simply re-use the existing cursor for that SQL.
    Simple select statements are much faster than executing them from ProcedureAlso not really correct. SQL performance is SQL performance. It has nothing to do with how you create the SQL on the client side and what client interface you use. The SQL engine does not care whether you use a PL/SQL ref cursor or a Java class as your client interface. That does not change the SQL engine's performance.
    Yes, this can change the performance on the client side. But that is entirely in the hands of the developer and how the developer selected to use the available client interfaces to interface with the SQL cursor in the SQL engine.
    Pros
    Code changes for modifying select query in PL/SQL much easier than in JavaThis is not a pro merely for ref cursors, but using PL/SQL as the abstraction layer for the data model implemented, and having it provide a "business function" interface to clients, instead of having the clients dealing with the complexities of the data model and SQL.
    I would seriously consider ref cursors in your environment. With PL/SQL servicing as the interface, there is a single place to tune SQL, and a single place to update SQL. It allows one to make data model changes without changing or even recompiling the client. It allows one to add new business logical and processing rules, again without having to touch the client.

  • Need to wite pl sql procedure for dynamic select statement

    Need pl sql procedure for a Dynamic select statement which will drop tables older than 45 days
    select 'Drop table'||' ' ||STG_TBL_NAME||'_DTL_STG;' from IG_SESSION_LOG where substr(DTTM_STAMP, 1, 9) < current_date - 45 and INTF_STATUS=0 order by DTTM_STAMP desc;

    I used this to subtract any data older than 2 years, adjustments can be made so that it fits for forty five days, you can see how I changed it from the originaln dd-mon-yyyy to a "monyy", this way it doesn't become confused with the Static data in the in Oracle, and call back to the previous year when unnecessary:
    TO_NUMBER(TO_CHAR(A.MV_DATE,'YYMM')) >= TO_NUMBER(TO_CHAR(SYSDATE - 365, 'YYMM'))

  • Problem with MySQL - WLS61:General error: select command denied to user: 'foo@lion.e-pmsi.fr' for table 'finess'

    Hi
    I've been trying to adapt and deploy an enterprise appliaction developped and deployed
    before under JBoss.
    My database is MySQL and I use Together Control Center for development and hot deployment.
    After having modified a lot of things (the seamless protability seems always sor
    far :), now I get some strange error when deploying from withing Together Control
    Center 6.0:
    WLS61:General error: select command denied to user: '[email protected]' for table
    'finess'
    Off course the user foo has all possible and imaginable rights.
    Does anybody have an idea on how to get around it ?
    Thanks
    Alireza

    Found the answer... email that went to junk mail. Hope this helps others!
    Hello Subscription User,
     Thanks for choosing ClearDB for your database needs. We appreciate your business and 
     your interest in our services. Our commitment to all of our customers is that we 
     provide a high quality of service on all of our database systems. Part of that 
     commitment includes the enforcement of database size quotas in order to ensure 
     the highest quality of service for our customers.
     As such, we're sending you this automated message regarding one of your databases:
     Database: wp____
     Tier/Plan: Mercury
     Tier size quota: 20 MB
     This database has either reached or has exceeded its maximum allowed size for the 
     'Mercury' plan/tier that it currently belongs to. As such, our systems were forced to 
     place a read-only lock on it. We kindly encourage you to upgrade your database 
     to a larger tier/plan so that we can restore write privileges and enable complete 
     access to it from your account.
     If you feel that you have received this notification in error, please feel free 
     to contact us by replying to this email along with information that you feel may 
     assist us in assessing the situation with your database.
     Thanks again for choosing ClearDB,
     The ClearDB Team

  • Problem on select command for table AFKO-GSTRS,AFKO-GSUZS

    Hi all Abaper,
    I faced a problem on using select command to select out the records from table AFKO (Production order header)
    If i want to select out records that
    AFKO-GSTRS >= 14.4.2006 (schedule start date)
    AFKO-GSUZS >= 00:00:00 (schedule start time)
    AFKO-GSTRS <= 15.4.2006 (schedule start date)
    AFKO-GSUZS <= 00:00:00 (schedule start time)
    The select statement:
    SELECT AUFNR RSNUM DISPO GSTRS GSUZS
            INTO TABLE GT_AFKO FROM AFKO
                    WHERE
           ( GSTRS >= GV_ST_DATE AND GSUZS >= GV_ST_TIME )
       AND ( GSTRS <= P_DATE AND GSUZS <= P_TIME ).
    PS.  if GV_ST_DATE = 14.4.06,  GV_ST_TIME = '00:00:00'
            P_DATE AND = 15.4.06,      P_TIME = '00:00:00'
    This statement just select out records in
    between 14-15.4.06 and at time '00:00:00'.
    some Production orders at 14.04.06 ,'09:00:00' will be filter out.
    I know the problem on that system just consider the date and time separately.
    Does anyone know how to link the date and time up? or does any data type allow for combination of date and time data?
    Thx for your reply in advance~

    Thx Amit and Vijay.
    The data type for GV_ST_DATE, P_DATE are <b>SY-datum</b>
    and GV_ST_TIME, P_TIME  are <b>SY-UZEIT</b>
    Actually, P_DATE & P_TIME are user input parameters.
    The records I wanna get are the period back 24 hrs from P_DATE & P_TIME.
    For example, if user input P_DATE = 15.04.2006,
                               P_TIME = '10:00:00'.
    Then records selected out should be:
    from 14.04.2006 , '10:00:00' TO 15.04.2006, '10:00:00'
    if production order schedule start = <b>14.04.2006 , 09:00:00</b>
    it will be <b>included</b>.
    if production order schedule start = <b>15.04.2006 , 01:00:00</b>
    it will be <b>excluded</b>.
    However, the following statement cannot get the desired records.
    Select....
    where GSTRS >= GV_ST_DATE AND GSUZS >= GV_ST_TIME
    AND   GSTRS <= P_DATE AND GSUZS <= P_TIME.
    Since GV_ST_TIME & P_TIME are both = '00:00:00',
    for Production order( sch start date = 14.04.2006 , sch start time = 09:00:00 ), '09:00:00' is greater than '00:00:00' but it is not less than '00:00:00'.
    Thus, this Pro. Order will be filtered!!
    However can improve my SQL statement to get the desired data?

  • Select command for 2 dimensions

    Hi All,
    Can we use Select command for query from 2 dimensions ?
    or how to do the query using script logic ??
    any suggession ??
    Here's the expand parameters :
    ROW                     ROW
    OTHERDTLS     PROCESS
    BASMEMBERS     BASMEMBERS AND FSG <> ""

    More detail is needed.  This is for BPC and which version?
    - Are you trying to USE script logic to "SELECT" 2 sets of data for use in a logic statement?
    - Or are you trying to build a report that will NEST 2 sets of ROW data? 
    Any other details would be helpful so we get a clear picture of the question
    Thanks

  • HT2534 While creating an account from my iPad there is no option for selecting none in the payment options. It states I have to give my credit card details. What's the procedure to open a free account?

    While creating an account from my iPad there is no option for selecting none in the payment options. It states I have to give my credit card details. What's the procedure to open a free account?

    It's in the article.  You must first sign-out your current account, then go to App store to purchase a Free App.  It will ask you to either Sign in or create a new AppleID.  That's when you start creating a new AppleaID and NONE will be available as a payment option.

  • Problem in Procedure for using sequence...

    Hi,
    I created a procedure for generating sequence in target using below query
    SELECT EMP.EMP_SEQ.NEXTVAL FROM DUAL
    but its working on one system in other system its giving below error...
    ODI-1228: Task EMP_LOAD_EMP_SEQ_PROC (Procedure) fails on the target ORACLE connection EMP_LOAD.
    Caused By: java.sql.SQLException: SQL string is not a DML Statement at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1393)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3887)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1508)
    at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java:665)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeUpdate(SnpSessTaskSql.java:3218)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java:1785)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2805)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1818)
    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$2.doAction(StartScenRequestProcessor.java:559)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor.doProcessStartScenTask(StartScenRequestProcessor.java:481)
    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$StartScenTask.doExecute(StartScenRequestProcessor.java:1040)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:619)
    Please help me regarding this issue..
    Thanks in Advance...

    Odi Procedures are mainly meant for DML execution..A SELECT query there holds little or no value in my opinion..
    Select queries are only usable in Command on Source and there the general application of that is to use those values returned by the SELECT query on Command Source as a input to the Command/Query/Statement/Java or Jython block at the Command on Target Tab in a one by one iterative manner.
    Lets say your command on source returns 5 rows..So your command on target is executed 5 times and you can use the attributes of these rows as inputs to your command on target in each iteration .. It works like an Internal Cursor

  • Alternative for EXEC command(Native SQL)

    Hi Friends,
             While Using the EXEC command in native sql it is showing the obselete Error  , Can  any one help  with giving the alternative for the commands for native SQl.
           Immediate

    In a Native SQL statement, data is passed between the ABAP program and the database using host variables. A host variable is an ABAP variable that is identified as such in the Native SQL statement by a preceding colon (:).
    Example
    Displaying an extract from the table AVERI_CLNT:
    DATA: F1(3), F2(3), F3(3).
    F3 = ' 1 '.
    EXEC SQL.
      SELECT CLIENT, ARG1 INTO :F1, :F2 FROM AVERI_CLNT
             WHERE ARG2 = :F3
    ENDEXEC.
    WRITE: / F1, F2.
    To simplify the form of the INTO lists in the SELECT statement, you can, as in Open SQL, specify a single structure as the target area.
    Example
    Displaying an Extract from the Table AVERI_CLNT:
    DATA: BEGIN OF WA,
            CLIENT(3), ARG1(3), ARG2(3),
          END OF WA.
    DATA  F3(3).
    F3 = ' 1 '.
    EXEC SQL.
      SELECT CLIENT, ARG1 INTO :WA FROM AVERI_CLNT
             WHERE ARG2 = :F3
    ENDEXEC.
    WRITE: / WA-CLIENT, WA-ARG1.
    Native SQL supports the directly-executable commands of your underlying database system. There are other special commands that you can use after the EXEC SQL statement for cursor handling, stored procedures (procedures stored in the database), and connections to other databases.
    Cursor Processing

  • Fixed procedure for Costing. (Sequence)

    Dear All
    Pls explain the Fixed procedure for Costing. (Sequence)
    Regards
    Avijit

    Odi Procedures are mainly meant for DML execution..A SELECT query there holds little or no value in my opinion..
    Select queries are only usable in Command on Source and there the general application of that is to use those values returned by the SELECT query on Command Source as a input to the Command/Query/Statement/Java or Jython block at the Command on Target Tab in a one by one iterative manner.
    Lets say your command on source returns 5 rows..So your command on target is executed 5 times and you can use the attributes of these rows as inputs to your command on target in each iteration .. It works like an Internal Cursor

  • What should be the procedure for  export parameter in CATT

    Hello Everybody,
    I am working with CATT, and the transactions are <b>ME21N</b> and <b>MIGO</b>.
    when i am executing the transaction <b>ME21N</b> i will get the <b>Pur Ord No</b>in the message, and i would like to export <b>Pur Ord No</b> to the transaction <b>MIGO</b> as thr is one field named Purch.ord no in Migo.
    what should be the Procedure for exporting a parameter?
    Thanks,
    Regards Afroz

    Hello Afroz,
    If you are using eCATT then following is the procedure of capturing messages in the two recording methods - TCD & SAPGUI.
    => TCD Recording Mode:
    In TCD recording mode, after dobleclicking on Interface name from the TCD command in the editor on left side, just before the MSG folder DYNPRO folder will appear on right side.
    -This DYNRPO folder contains the screen sequences contain the screen occurred during recording time. The last Dynpro of this folder contains the messages occurred during recording.
    -Select this last folder & click on Simulate Screen icon of the same Interface editor. It will redirect to the screen where the message values exist. There select the Purchase Order Number and click on Read Field Value icon. Give the name of Export Variable.
    The export variable will contain the value of the purchase order number, which can be passed to MIGO.
    => SAPGUI Recording Mode:
    In the SAPGUI recording mode, the screen on which the message appeared will be used to capture the variable name, which is Purchase Order Number in this case.
    If the Purchase Order Number is second variable of the message displayed(e.g. Purchase Number 2122323 Is Created)
    then use the following code -
    e.g.
    MESSAGE ( MSG_1 ).
    SAPGUI ( ME21N_4001_STEP_5 ).
    ENDMESSAGE ( E_MSG_1 ).
    Assing the value from the message to the export
    parameter
    P_EC_PurOrdNo = E_MSG_1-[1]-MSGV2.
    There are total four MSGV1-MSGV4 variables. Dobule click on MSG_1 of the MESSAGE statement above. Putting the value in the export variable from the right message variable will give the purchase order number.This can be passed as MIGO.
    Regards

  • Procedure for installing OS (Leopard) in a new hard drive unit.

    I am running a Powerbook about two years old under the latest version of Tiger, and I want to do some renovation and increase the performance of it before installing Leopard, such as buying an additional 1gb of ram (resulting in the max of 2gb of ram), and also change my hard drive from a 100gb 5400 rpm, to a new seagate 100gb 7200 rpm.
    My question come to this: if I have my Leopard DVD, and I have finished installing the hardware on my Powerbook. What comes next to install the DVD: (just as a note, I wish to have a clean install of my OS)
    - I will probably install the ram under Tiger, and make sure that it is recognized, etc.., and then move forward to the hard drive change.
    - should I insert the DVD (under Tiger), shut down my laptop, perform the change of hard drive and then press the "Power button" followed by the boot command key, and it must be immediately recognized?
    - or, should I proceed to change the hard drive and after it has been physically installed, when I turn "ON" my laptop, I should be able to insert the DVD and press the boot command key?
    - Which is the best procedure for what I am trying to achieve? are both of these possible? is there any difference or preference whatsoever? I will appreciate any feedback or warning on any preparation that should be made to the hard drive when it is new. Should it be pre-formatted? or will it work straight out of the box in order to initiate the installation process.
    first time doing this type of hardware changes, and I'll appreciate any recommendations or thoughts on this.
    for reference, I am planing on buying these products:
    *1.0GB PC2700 DDR SODIMM 200 Pin Memory Module 128x64 CL 2.5
    *100GB 2.5" Seagate Momentus 7200.1 7200RPM ATA Notebook drive
    Initially I am thinking on buying these over at OWC.
    thanks,

    orlandold:
    Your plan to install the RAM and test it with Tiger is fine, although not necessary. You can install it at the same time you install your HDD. Either way will be fine.
    Once your new HDD is installed, follow these directions:
    (Note: they are written for Tiger and earlier, but should work fine)
    Formatting, Partitioning Zeroing a Hard Disk Drive
    Warning! This procedure will destroy all data on your Hard Disk Drive. Be sure you have an up-to-date, tested backup of at least your Users folder and any third party applications you do not want to re-install before attempting this procedure.
    Boot from the install CD holding down the "C" key.
    Select language
    Go to the Utilities menu (Tiger & later) Installer menu (Panther & earlier) and launch Disk Utility.
    Select your HDD (manufacturer ID) in left side bar.
    Select Partition tab in main panel. (You are about to create a single partition volume.)
    Select number of partition in pull-down menu above Volume diagram.
    (Note 1: One partition is normally preferable for an internal HDD.)
    Type in name in Name field (usually Macintosh HD)
    Select Volume Format as Mac OS Extended (Journaled)
    Click Partition button at bottom of panel.
    Select Erase tab
    Select the sub-volume (indented) under Manufacturer ID (usually Macintosh HD).
    Check to be sure your Volume Name and Volume Format are correct.
    Optional: Select on Security Options button (Tiger & later) Options button (Panther & earlier).
    Select Zero all data. (This process will map out bad blocks on your HDD. However, it could take several hours. If you want a quicker method, don't go to Security Options and just click the Erase button.)
    Click OK.
    Click Erase button
    Quit Disk Utility.
    Installation Process
    Open Installer and begin installation.
    Choose to Customize and deselect Foreign Language Translations and Additional Printer drivers.
    Check box to install X11 (Tiger) BSD Subsystems (Panther & earlier).
    Proceed with installation.
    After installation computer will restart for setup.
    After setup, reboot computer.
    Go to Applications > Utilities > Disk Utility.
    Select your HDD (manufacturer ID) in left side bar.
    Select First Aid in main panel.
    Click Repair Disk Permissions.
    Connect to Internet.
    Download and install Mac OS X 10.4.11 Combo update (PPC).
    Computer will restart after updates.
    Go to Applications > Utilities > Disk Utility.
    Select your HDD (manufacturer ID) in left side bar.
    Select First Aid in main panel.
    Click Repair Disk Permissions.
    Please do post back with further questions or comments.
    Cheers
    cornelius

  • Stored procedures for read only snapshots

    Hi
    I have to convert some tables into read only snapshots as per client's requirements,
    There are some stored procedures which are based on these tables which basically fetch values from these tables, how do I use these existing procedures so that they can be used even after converting the tables into snapshots ?

    >
    Sean Byrne wrote:
    > I have a calculated date shared variable that I would like to use as a parameter. This date is not contained in the database. The user would put in 12/31/09, and only records that are before this date would show up. I want to use a stored procedure to achieve this result. Does this calculated date have to be written to a table for this to work? The tables are controlled by our ERP on demand vendor, which restricts us from writing anything to their tables. They allow us to use Crystal Reports to retrieve data but no modifications of their tables. One way around this restriction is to create another database on the server to pull data from the ERP database. Any advice would be appreciated? Can I write stored procedures within Crystal Reports?
    I think you are just trying to query your database with a date parameter correct?  In your case I doubt you want to use a "stored procedure", but a command object that holds a simply sql query.  Are you familiar with SQL?  When you create your report, you will be asked to select your datasource. Once your database credentials are entered you should see rows that says "Add Command, Tables, Views, etc".  Select Add Command and you will be presented with a window in which to enter your SQL command.  On the right of that box you will set your parameter. Create your "date" parameter.
    Your query will look something like this
    Select * from table.table where date <
    You can add your dataparam by double clicking it after you created it.
    HTH
    Chad

  • MSSQL Stored procedure : only one command executed

    For a MSSQL Stored Procedure, We have used this
    Solution1:
    Just put SET NOCOUNT OFF in the end of the stored procedure. After that run the stored procedure in the Desktop Intelligence report.
    Or
    If the above doesnu2019t works then please try the following solution.
    Solution2:
    You have to add the given parameter in .sbo file -> save the file and run the stored Procedure.
    This file should be located under <drive>\Business Objects\BusinessObjects Enterprise 11.5\dataAccess\RDBMS\connectionServer\odbc\odbc.sbo
    <Defaults>
    <Parameter Name="Force SQLExecute">Always</Parameter>
    but it still does not work
    What others?

    Hello
    thank you for your answer but indicated procedure to test does not work too
    the message is the same : u201CNo column and no data to fetchu201D
    I return with more details :
    to create a new report DesKi, I use this stored procedure
    CREATE PROCEDURE dbo.test1 @matricule integer
    AS
    BEGIN
    SET NOCOUNT OFF
    delete from Temp_matr_boucle
    execute absences_matricules_per_matr @matricule /* it is ok */
    select MATRICULE ,NOM ,PRENOM ,CDDEP, NBR_PERIODE, NBR_JOURS , UNITE ,
           DATE_MIN,  DATE_MAX ,TYPE_ABSENCE, MATRICULE_CAR, NBR_JOURS_SERVICES
    from Temp_matr_boucle as result  /* not execute */
    return
    END
    Launched directly from the database it work verry well.
    Launched in Deski rapport, we get the same message
    u201CNo column and no data to fatchu201D
    The exec command works because the table "Temp_matr_boucle" is filled but is no longer running the select commande.
    You have advisor to use one a two solutions (see replay from DWinkel)
    1) SET NOCOUNT OFF
    or
    2) add the parameter:
    <Defaults>
    <Parameter Name="Force SQLExecute">Always</Parameter> in odbc.sbo file
    Note that we use the OLEDB driver and not the odbc
    We all tried both but the result is the same
    thank you for your help
    regards
    Mariana

Maybe you are looking for

  • Not able to visualize the person I'm calling on Skype anymore, now that upgraded to Mountain Lion operating system. Any suggestions?

    Right after I downloaded the new Mountain Lion OS, I was not able to see the person I'm calling on Skype. The person I'm calling has no issue with the video streaming, however. Is this a Mountain Lion issue, a Skype issue or some of each? From lookin

  • HT1414 itunes page blank for iphone 4

    Hello, I just restored my Iphone4.  After it was done, now in Itunes, it recognizes the phone when plugged in, however the itunes iphone page is blank. This phone is straight from the apple store, no modifications, jailbreaking or changes.  Anyone kn

  • Blend mode won't work.

    I have adobe photoshop CS5.1 and i can only click some of my blend modes. Why?

  • MetaData Services (MDS) Question

    I have extended a View Object (VO) and created a substitution for it. As I understand it, the substitution is stored in the MDS. If a Controller (CO) references the VO, will the substitution be picked up? Does the CO need to be extended in this case?

  • Which airport extreme card?

    hello folks, i'm a bit confused as to which airport extreme card i need. is the M8881LL/A and the A1026 one and the same? and do i have a built in antenna? i have a Dual-core 2.3GHz PowerPC G5, model # M9591LL/A bought in 2006. thanks, russ