Delete table in SQL command

Hello,
As part of my report I populate a table then reference it in several following subreports.
The issue I'm having is that I need to clear all the data from my table after using it to allow the report to run again (and not get multiple results)
To do this I have tried to add a sub report at the very end (and start) of my report with the SQL command truncate table <tablename> or delete <tablename> or delete <tablename> where 1 = 1.
When I try truncate I get an error saying that I don't have permission (despite granting it but hey...) which is why I switched to delete, this runs fine but the table doesn't get deleted...
Any thoughts as to why this isn't working/how I can clear my table? I have thought of setting up a separate scheduled job to delete the table contents however I do also need to run the report several times with different parameters so this isn't an ideal solution.
I have tried adding a select after my delete statement as I thought if it had something to display on the report it would have to look at it but this didn't make any difference.
Any help will be much appreciated!
Thanks
Chris

Thanks for that!
I have had a go at this and I can see how it will work although I have limited access on the Crystal userid I have so will need to have the SP created as part of our nightly refresh script I think.
Is there no way of getting crystal to run my delete statement otherwise?
Thanks again
Chris

Similar Messages

  • Crystal Reports XI does not allow to change Table to SQL command?

    I have report that has Table in Datasource and this table used in report and all fileds are mapped. I need to change table to SQL Command with the same result set of collumns. When I try to Update in Set Datasource Location - it does not work. CR XI allow to update Command to table but Table to Command just do nothing.
    What I have to do or how I can do it?

    Alexander,
    That's probably the "Best" way to do it, and long term you'll want to start adding BOE to your work flow.
    If you want to get around it, here how:
    1) MAKE A COPY OF YOUR REPORT AND WORK FROM THE COPY!!! This involves some a good deal of destruction before you get into reconstruction.
    2) Once you have created your command, remove the table.
    3) Now the fun part... Go through report and manually change all references to the 1st table...
       report fields
       formulas
       selection criteria
       groups
       the whole 9 yards...
    A short cut for the future... If you make all of your formula copies of all of your fields ( fCustomerName = {Table.CustomerName} ) and then only use the formula version of the field in the reports, you can make these changes very easily. (All you have to do is update the one set of formulas.)
    Also as a side note before you get started... You may want to think twice before you mix commands with tables. You loose the server side filtering and grouping on the tables when you do that.  So if you have several tables, you are better off doing the whole thing in one SQL command, do all of your filtering and sorting there and use it to replace ALL of your tables.
    Basically, Graham's way is the easy way... Assuming you have access to the BOE.
    Jason

  • Deleted Table in SQL and DBML still remained relation !!!!

    Hi Dear Experts
    I've faced the serious problem please help me :( !
    I've deleted a table from SQL database and also dbml and i created new table instead
    Also in Store Procedure the new table is used
    I've checked that the old table has completely removed
    but when in want to excecute the solution (the SP it tells me that previous relation (Foreignkey )
    is still remained ?!!!!!!) 
    ***THE OLD TABLE WAS IN RELATION WITH A TABLE IN SP BUT NOW IS IN RELATION WITH NEW TABLE*****
    Why this error occured even i've have removed the table?????
    Thanks a lot

    Error Message
    the insert statment Confilicted with foreign key constarint "FK_<tableName>_<oldtable>".the conflict occurred in database,table<old table>,column'x'
    thanks a lot
    Hi nasringh,
    Could you please check the relationship and the underlying records between foreign key table and primary key table? We must insert Data into the parent table which containing the Primary Key, before attempting to insert data into the child table containing
    the Foreign Key.
    For more detail information, please take a look at the following similar thread:
    http://stackoverflow.com/questions/2965837/insert-statement-conflicted-with-the-foreign-key-constraint
    http://www.codeproject.com/Questions/281774/The-INSERT-statement-conflicted-with-the-FOREIGN-K
    Regards,
    Elvis Long
    TechNet Community Support

  • Strange caching on a paging enabled data table when sql-command changes

    Got some strange results when changing the command property of a JdbcRowSetXImpl. To reproduce:
    - create new jsp page
    - drag a table from Data Sources onto the page design grid
    - put a DataTable on the page design grid
    - bind DataTable to the RowSet for the table from step 2
    - enable paging on the DataTable; make sure the page is smaller than the number of items in the table. Also add the page navigation buttons
    - add a read-write property 'query' to SessionBean1
    - add a button to the page design grid
    - double click button and add
    getSessionBean1().setQuery("SELECT * FROM <table> ORDER BY <someColumnName>"); // replace <> strings with appropriate names
    - change the command property / query string for the table in the page backing bean to getSessionBean1().getQuery();
    - run application
    - click on button with query change code 'behind it'
    - click on '->' next page button
    - click on '<-' previous page button
    Notice that one page is sorted, the other not. All pages that have been displayed before the 'query change' button was pressed remain in the 'old' sort order.
    I have tried to call xxxRowSet.execute(), dataTable1Model.getDataCache().reset() on several places, to no avail.
    The only hack I found to be working was adding a private static int hackCounter, and changing the ctor to dataTable1Model.setDataCacheKey("com.sun.datacache.bug.xxxRowSet" + hackCounter++);
    Clearly there must be a better solution.

    did u try dataTable1Model.execute();
    you didn't mention that you did.
    I have had datatables that didn't update only to find I didn't do dataTable1Model.execute();
    Regards
    Jonathan

  • SQL command editor doesn't take more than 1 insert command

    i am trying to copy whole table from a text file with creat table
    command and insert in to (with data) in the same table but SQL command
    editor giving me error and only allow me to enter one row of data at a
    time, any help would be much appriciated. 10g Express edition. started
    Oracle first time last week. You guys see me here a lot un till i get
    on the stage where i can start helping others.
    INSERT INTO LOCATIONS VALUES (9,'Poole');
    INSERT INTO LOCATIONS VALUES (10,'Durham');
    INSERT INTO LOCATIONS VALUES (11,'Doncaster');
    Column Name Data Type Nullable Default Primary Key
    LOCATION_ID NUMBER No - 1
    DESCRIPTION VARCHAR2(50) No - -
    error message:
    ORA-00911: invalid character
    but its working with same line of code in a one at a time
    Edited by: mrHarris on 20-Oct-2008 04:11

    Hi,
    you have multiple options here:
    1) upload as a script:
    a) save the statements in a file
    b) go to sql workshop > sql scripts
    c) upload script and run the script
    2) run the script line by line in the sql commands window directly:
    a) go to sql workshop > sql commands
    b) copy all statements there
    c) highlight the first statement with the mouse
    d) click "run" or press <ctrl>+enter
    3) use sql developer
    a) go to http://www.oracle.com/technology/products/database/sql_developer/index.html
    b) download and install
    c) connect to XE
    d) run the statements there
    Regards,
    ~Dietmar.

  • SQL Command for deleting T-Code for roles

    Hi Experts
    I want to delete the transaction from the role name by using SQL Command in MS-SQL Server  instead of going to /npfcg -> zwa_xyz (role name for user) and transaction code is CR01,CR01,CA01 Etc.,
    I have so many transaction code which is taking time to delete one by one.
    So is there any SQL Statement to delete the t-code for that rolename
    Delete from tablename where t-code=xyz and rolename in ('zwa_xyz',zwa_123')
    regards

    Hey,
    SAP does not support executing update/insert/delete SQLs on their tables,
    (the only SQL they support are select, and updates that they publish in their official site, such as notes in service.sap.com/notes)
    is is probably due to the fact that sap contains about 30,000 of table,
    and sometimes SAP uses cluster tables (which are difficult to handle in DB)
    in addition, each and every SP adds/remove table or changes existing tables.
    For example, you probably don't know that changing rule, would
    create a change document (cluster table - CDHDR, CDPOS and etc),
    If you want, it is very easy to get the full list of the table (and the sql) that are updated
    (as I mentioned before, it is not recommended to run this sql, because it is not supported!!!)
    just run transaction ST05 while deleting transaction from role,
    when you display the list, press shift+F8 (or summerized trace from the menu),
    and they search (Ctrl+F) the words: update or insert or delete.
    You can use standard API such as BAPIs (such as BAPI_USER_*)/IDOCs(such as USERCHANGE),
    and execute them from the portal and any other place (even in EXCEL or OS->meaning command line).
    Here more information on executing RFCs:
    1. in order to execute an RFC from excel, you should install SAP gui on the client that would execute the RFCs to the SAP, and you would have to write VBA code.
    2. in order to execute an RFC from command line, this is a little bit more difficult,
    sap provide RFC sdk (in service.sap.com/SWDC)
    3. in order to execute an RFC from .net you can use the .net connector,
    more information is here:
    NW RFC SDK - is there a guide somewhere?
    4. You can also, execute an RFC using Web service,
    by creating web-service from the RFC in SE37.
    I guess It will take more time to develop this they just executing the SQL.
    If you need more information in executing an RFC,
    please decide which option is your favorite,
    and I would add information...

  • How can I search multiple columns in a SQL command of Union tables

    Hi:
    We have a database with tables that are nearly identical that we use for production and production history.
    I have created an SQL command in Crystal 2008 to joins several of the tables and then added a "UNION" to connect the History and Prod tables.
    I need to search multiple (3 total) columns for 5 different data types, to return the records being investigated. I tried this using an "OR" statement in the where clause and have had inconsistant results.
    The first two or statement function perfectly the third works as long as the value being passed is numeric and the last two fail consistantly with invalid column name errors. It appears that crystal is getting confused and passing the wrong data type especially if I do a new search using a different option for the "?SearchParam"
    Can some one offer some insite on how I can search these fields to return the record data needed
    -- {?SearchParam} is the search parameter passed by Crystal that is a number 1 thru 5
    -- {?Search_Val} is a parameter that is passed by Crystal that is a string of what to search for 1 = Numeric CMP ord #("TBSLI21"."LI21_OR_NO"), 2 = Numeric CI ord # ( "TBSLI33"."LI33_CI_OR_NO"),
    --   3 =String  Ext Sys ord string ("TBSLI33"."LI33_EXT_SYS_SL_OR_NO"), 4 = String CMP Grp string ("TBSLI21"."LI21_OP_GRP_NO"), 5 = composit string PP ord string ("TBSOP13"."OP13_CLR_DAY" & "TBSOP13"."OP13_PP_GRP_SEQ_NO" & "TBSOP13"."OP13_CELL_ID")
    SELECT "TBSLI21"."LI21_OR_NO",
    "TBSLI21"."LI21_SH_DT_SCDL",
    "TBSLI21"."LI21_TS_EN_ORIG",
    "TBSLI21"."LI21_TS_SHIP",
    "TBSLI21"."LI21_SYS_ORD_CD",
    "TBSLI21"."LI21_SHIP_ID",
    "TBSLI21"."LI21_WRKST_ID",
    "TBSLI21"."LI21_LI_NO",
    "TBSLI33"."LI33_CI_OR_NO",
    "TBSLI33"."LI33_EXT_SYS_SL_OR_NO",
    "TBSLI21"."LI21_OP_GRP_NO",
    "TBSLI21"."LI21_LI_STAT",
    "TBSOP13"."OP13_OP_GRP_STAT",
    "TBSLI31"."LI31_LI_EV_DTL_TX",
    "TBSLI31"."LI31_DT_EN",
    "TBSLI31"."LI31_TM_EN",
    "TBSLI31"."LI31_LI_EV",
    "TBSLI21"."LI21_OP_WSH_FLNM",
    "TBSLI21"."LI21_PR_ITF_CD",
    "TBSLI21"."MFG_PLANT_CD",
    "MFG_PLANT_LI"."MFG_PLANT_CD" as PrefPlant,
    "TBSOP13"."OP13_OP_GRP_DSP_CD",
    "TBSLI21"."LI21_LI_DSP_CD",
    "TBSOP13"."OP13_CLR_DAY",
    "TBSOP13"."OP13_PP_GRP_SEQ_NO",
    "TBSOP13"."OP13_CELL_ID",
    "MFG_PLANT_LI"."PRFR_MFG_PLANT_FLG",
    "TBSLI21"."LI21_OP_GRP_PS_NO1",
    "TBSLI21"."LI21_POMS_MERGE_NO",
    "TBSLI31"."LI31_OP_ID",
    "TBSLI21"."LI21_LI_POR_FG",
    "TBSLI21"."LI21_BIN_ID",
    "TBSLI21"."LI21_TS_MRSHL",
    "TBSLI33"."LI33_CI_LI_NO",
    "TBSLI33"."LI33_SH_ADDR_1",
    "TBSLI33"."LI33_SH_ADDR_2",
    "TBSLI33"."LI33_SH_ADDR_3",
    "TBSLI33"."LI33_SH_ADDR_4",
    "TBSLI33"."LI33_SH_CITY_NM",
    "TBSLI33"."LI33_SH_ST_NM",
    "TBSLI33"."LI33_SH_ZIP_CD",
    "TBSLI33"."LI33_CU_NM",
    "TBSLI33"."LI33_CU_BUS_NM"
    FROM   ((("CMPREPORTING"."dbo"."TBSLI33" "TBSLI33" FULL OUTER JOIN "CMPREPORTING"."dbo"."TBSLI21" "TBSLI21" ON ("TBSLI33"."LI33_BS_OR_NO"="TBSLI21"."LI21_OR_NO") AND ("TBSLI33"."LI33_BS_LI_NO"="TBSLI21"."LI21_LI_NO")) LEFT OUTER JOIN "CMPREPORTING"."dbo"."TBSOP13" "TBSOP13" ON "TBSLI21"."LI21_OP_GRP_NO"="TBSOP13"."OP13_OP_GRP_NO") LEFT OUTER JOIN "CMPREPORTING"."dbo"."TBSLI31" "TBSLI31" ON ("TBSLI21"."LI21_OR_NO"="TBSLI31"."LI31_OR_NO") AND ("TBSLI21"."LI21_LI_NO"="TBSLI31"."LI31_LI_NO")) LEFT OUTER JOIN "CMPREPORTING"."dbo"."MFG_PLANT_LI" "MFG_PLANT_LI" ON ("TBSLI21"."LI21_OR_NO"="MFG_PLANT_LI"."OR_NO") AND ("TBSLI21"."LI21_LI_NO"="MFG_PLANT_LI"."LI_NO")
    WHERE   {?aSearchParam} = 1 and "MFG_PLANT_LI"."PRFR_MFG_PLANT_FLG"='Y' AND "TBSLI21"."LI21_OR_NO"=Cast( {?Search_Val} as Int)
    or {?aSearchParam} = 2 and "MFG_PLANT_LI"."PRFR_MFG_PLANT_FLG"='Y' AND "TBSLI33"."LI33_CI_OR_NO"=Cast( {?Search_Val} as numeric(12,0))
    or {?aSearchParam} = 3 and "MFG_PLANT_LI"."PRFR_MFG_PLANT_FLG"='Y' AND Convert( VarChar(20),"TBSLI33"."LI33_EXT_SYS_SL_OR_NO")= Convert( VarChar(20), {?Search_Val})
    or {?aSearchParam} = 4 and "MFG_PLANT_LI"."PRFR_MFG_PLANT_FLG"='Y' AND Convert( VarChar(8),"TBSLI21"."LI21_OP_GRP_NO") = Convert( VarChar(8), {?GroupNo})
    or {?aSearchParam} = 5 and "MFG_PLANT_LI"."PRFR_MFG_PLANT_FLG"='Y' AND Convert( VarChar(8), ("TBSOP13"."OP13_CLR_DAY" & "TBSOP13"."OP13_PP_GRP_SEQ_NO" & "TBSOP13"."OP13_CELL_ID")) = Convert( VarChar(8), {?GroupNo})
    Union
    SELECT "TBSLI21_HIST"."LI21_OR_NO",
    "TBSLI21_HIST"."LI21_SH_DT_SCDL",
    "TBSLI21_HIST"."LI21_TS_EN_ORIG",
    "TBSLI21_HIST"."LI21_TS_SHIP",
    "TBSLI21_HIST"."LI21_SYS_ORD_CD",
    "TBSLI21_HIST"."LI21_SHIP_ID",
    "TBSLI21_HIST"."LI21_WRKST_ID",
    "TBSLI21_HIST"."LI21_LI_NO",
    "TBSLI33_HIST"."LI33_CI_OR_NO",
    "TBSLI33_HIST"."LI33_EXT_SYS_SL_OR_NO",
    "TBSLI21_HIST"."LI21_OP_GRP_NO",
    "TBSLI21_HIST"."LI21_LI_STAT",
    "TBSOP13_HIST"."OP13_OP_GRP_STAT",
    "TBSLI31_HIST"."LI31_LI_EV_DTL_TX",
    "TBSLI31_HIST"."LI31_DT_EN",
    "TBSLI31_HIST"."LI31_TM_EN",
    "TBSLI31_HIST"."LI31_LI_EV",
    "TBSLI21_HIST"."LI21_OP_WSH_FLNM",
    "TBSLI21_HIST"."LI21_PR_ITF_CD",
    "TBSLI21_HIST"."MFG_PLANT_CD",
    "MFG_PLANT_LI_HIST"."MFG_PLANT_CD",
    "TBSOP13_HIST"."OP13_OP_GRP_DSP_CD",
    "TBSLI21_HIST"."LI21_LI_DSP_CD",
    "TBSOP13_HIST"."OP13_CLR_DAY",
    "TBSOP13_HIST"."OP13_PP_GRP_SEQ_NO",
    "TBSOP13_HIST"."OP13_CELL_ID",
    "MFG_PLANT_LI_HIST"."PRFR_MFG_PLANT_FLG",
    "TBSLI21_HIST"."LI21_OP_GRP_PS_NO1",
    "TBSLI21_HIST"."LI21_POMS_MERGE_NO",
    "TBSLI31_HIST"."LI31_OP_ID",
    "TBSLI21_HIST"."LI21_LI_POR_FG",
    "TBSLI21_HIST"."LI21_BIN_ID",
    "TBSLI21_HIST"."LI21_TS_MRSHL",
    "TBSLI33_HIST"."LI33_CI_LI_NO",
    "TBSLI33_HIST"."LI33_SH_ADDR_1",
    "TBSLI33_HIST"."LI33_SH_ADDR_2",
    "TBSLI33_HIST"."LI33_SH_ADDR_3",
    "TBSLI33_HIST"."LI33_SH_ADDR_4",
    "TBSLI33_HIST"."LI33_SH_CITY_NM",
    "TBSLI33_HIST"."LI33_SH_ST_NM",
    "TBSLI33_HIST"."LI33_SH_ZIP_CD",
    "TBSLI33_HIST"."LI33_CU_NM",
    "TBSLI33_HIST"."LI33_CU_BUS_NM"
    FROM   ((("CMPREPORTING"."dbo"."TBSLI33_HIST" "TBSLI33_HIST" FULL OUTER JOIN "CMPREPORTING"."dbo"."TBSLI21_HIST" "TBSLI21_HIST" ON ("TBSLI33_HIST"."LI33_BS_OR_NO"="TBSLI21_HIST"."LI21_OR_NO") AND ("TBSLI33_HIST"."LI33_BS_LI_NO"="TBSLI21_HIST"."LI21_LI_NO")) LEFT OUTER JOIN "CMPREPORTING"."dbo"."TBSOP13_HIST" "TBSOP13_HIST" ON "TBSLI21_HIST"."LI21_OP_GRP_NO"="TBSOP13_HIST"."OP13_OP_GRP_NO") LEFT OUTER JOIN "CMPREPORTING"."dbo"."TBSLI31_HIST" "TBSLI31_HIST" ON ("TBSLI21_HIST"."LI21_OR_NO"="TBSLI31_HIST"."LI31_OR_NO") AND ("TBSLI21_HIST"."LI21_LI_NO"="TBSLI31_HIST"."LI31_LI_NO")) LEFT OUTER JOIN "CMPREPORTING"."dbo"."MFG_PLANT_LI_HIST" "MFG_PLANT_LI_HIST" ON ("TBSLI21_HIST"."LI21_OR_NO"="MFG_PLANT_LI_HIST"."OR_NO") AND ("TBSLI21_HIST"."LI21_LI_NO"="MFG_PLANT_LI_HIST"."LI_NO")
    WHERE  {?aSearchParam} = 1 and "MFG_PLANT_LI_HIST"."PRFR_MFG_PLANT_FLG"='Y' AND "TBSLI21_HIST"."LI21_OR_NO"= Cast( {?Search_Val} as Int)
    or {?aSearchParam} = 2 and  "MFG_PLANT_LI_HIST"."PRFR_MFG_PLANT_FLG"='Y' AND "TBSLI33_HIST"."LI33_CI_OR_NO"= Cast( {?Search_Val} as numeric(12,0))
    or {?aSearchParam} = 3 and  "MFG_PLANT_LI_HIST"."PRFR_MFG_PLANT_FLG"='Y' AND Convert( VarChar(20), "TBSLI33_HIST"."LI33_EXT_SYS_SL_OR_NO")= Convert( VarChar(20),{?Search_Val})
    or  {?aSearchParam} = 4 and "MFG_PLANT_LI_HIST"."PRFR_MFG_PLANT_FLG"='Y' AND Convert( VarChar(8),"TBSLI21_HIST"."LI21_OP_GRP_NO")= Convert( VarChar(8), {?GroupNo} )
    or {?aSearchParam} = 5 and  "MFG_PLANT_LI_HIST"."PRFR_MFG_PLANT_FLG"='Y' AND Convert( VarChar(8), ("TBSOP13_HIST"."OP13_CLR_DAY" & "TBSOP13_HIST"."OP13_PP_GRP_SEQ_NO" & "TBSOP13_HIST"."OP13_CELL_ID")) = Convert( VarChar(8), {?GroupNo})

    This is actually a fairly easy fix - because of the way the "OR" works in SQL, you need to surround each "set" of statements in the or with parentheses.  So, it would look something like this:
    Where
    ({?aSearchParam} = 1 and "MFG_PLANT_LI"."PRFR_MFG_PLANT_FLG"='Y' AND "TBSLI21"."LI21_OR_NO"=Cast( {?Search_Val} as Int))
    or
    ({?aSearchParam} = 2 and "MFG_PLANT_LI"."PRFR_MFG_PLANT_FLG"='Y' AND "TBSLI33"."LI33_CI_OR_NO"=Cast( {?Search_Val} as numeric(12,0)))
    or
    ({?aSearchParam} = 3 and "MFG_PLANT_LI"."PRFR_MFG_PLANT_FLG"='Y' AND Convert( VarChar(20),"TBSLI33"."LI33_EXT_SYS_SL_OR_NO")= Convert( VarChar(20), {?Search_Val}))
    or
    ({?aSearchParam} = 4 and "MFG_PLANT_LI"."PRFR_MFG_PLANT_FLG"='Y' AND Convert( VarChar(8),"TBSLI21"."LI21_OP_GRP_NO") = Convert( VarChar(8), {?GroupNo}))
    or
    ({?aSearchParam} = 5 and "MFG_PLANT_LI"."PRFR_MFG_PLANT_FLG"='Y' AND Convert( VarChar(8), ("TBSOP13"."OP13_CLR_DAY" & "TBSOP13"."OP13_PP_GRP_SEQ_NO" & "TBSOP13"."OP13_CELL_ID")) = Convert( VarChar(8), {?GroupNo}))
    -Dell

  • How to delete HFM Application Tables in SQL

    Hi Gurus
    1.How to delete HFM Application Tables in SQL?
    Manually its deleting but each application having 120-150 tables? how to do this in a single shot?
    I have deleted few applications using workspace/ shared services, but still its showing under HFM server under SQL Tables.
    Please help me
    regards
    Smilee

    Hi Smilee,
    1. If the application can be opened in Financial Management web interface, go to the Manage Taskflows module and make sure that no taskflows still exist for this application. Delete any existing taskflows.
    2. If the application exists in Shared Services, right click on the application in Shared Services and try to delete the application from there
    3. Stop Hyperion Shared Services and all Financial Management Windows processes and take backups of the relational database schemas of both.
    4. Check the relational database repository of Hyperion Shared Services, in the table "ces_apps" and make sure that there are no more rows containing the appname "EXAMPLE". If row still exists you should seek help from Oracle Global Software Support to clean up the Hyperion Shared Services before proceeding.
    5. It is possible to remove all content for a deleted application from the Financial Management relational database. Extreme care should be taken when manually manipulating database tables as permanent damage can be done to the intended application and other applications if the wrong content is deleted.
    a) Begin by deleting all tables, indexes, sequences and package objects that begin with the application name
    b) Delete any tables beginning HSV_appname_xxxxxx
    c) Delete any rows from the HSX_CLUSTER_xxxxx tables referring to the application.
    d) Delete any rows from the HSV_ACTIVITY_KILL_USERS, HSV_ACTIVITY_NO_ACCESS, HSV_ACTIVITY_SESSIONS and HSV_ACTIVITY_USERS and HSV_USERS_ON_SYSTEM that refer to the application name.
    d) Delete the row containing name of the application from the HSX_DATASOURCES table.
    6. The next time all the Hyperion services are started again, the application should be safely removed from Windows client.
    You can contact your DBA to write a query on how to delete it.
    Hope this helps,
    Thank you,
    Charles Babu J

  • Delete IFS file with sql command

    Hi
    Is it possible to remove a file from IFS using an sql command? If so, what is it?
    Thanks
    Hugo

    No, this is not possible, nor is it supported. You may use the Java API to delete a file.

  • SQL Command table linking issues

    I have created a simple SQL command in CR 2008 to save the creation of a view on the DB (SQL Server 2005).  I then link it to another table from the same DB.  Once this was done I began experiencing extremely long run times versus the link with the original view.  The SQL command set was copied directly from the view in MS Visual Sudio.  The joins in CR are left outers and inner that worked fine with the original view.  We ended up running a trace of the SQL Server and found the SQL was producing 21,000 record reads everytime the primary table read a record.  It was not following the inner join at all.  I did a Show SQL in CR and found that the CR generated SQL looked very strange and not like the typical construction when the view was being used instead of the table  What am I doing wrong?  Below is a copy of the Show SQL for this particular issue.  It seems to be the second command set in italics that causes the issue.  That is from the SQL command I created in CR.
    Thanks,
    Brian
    PROD - FIN
    SELECT "MAN_JOBS"."JOB_NUMBER", "MAN_JOBS"."ACTUAL_START_DATE", "MAN_JOBS"."ACTUAL_START_DATE_2", "MAN_JOBS"."STD_PROCESS_SPEC", "MAN_JOBS"."COMPANY_CODE"
    FROM   "fin_prod"."dbo"."MAN_JOBS" "MAN_JOBS"
    EXTERNAL JOIN MAN_JOBS.STD_PROCESS_SPEC={?PROD - FIN: C_IC_PRODUCT_CHARACTERISTICS.PART_CODE} AND MAN_JOBS.COMPANY_CODE={?PROD - FIN: C_IC_PRODUCT_CHARACTERISTICS.COMPANY_CODE} AND MAN_JOBS.COMPANY_CODE={?PROD - FIN: KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE} AND MAN_JOBS.JOB_NUMBER={?PROD - FIN: KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.DOCUMENT_NUMBER} AND MAN_JOBS.STD_PROCESS_SPEC={?PROD - FIN: KX_PRODUCT_MASTER_EXT.PART_CODE}
    PROD - FIN
    SELECT *
    FROM dbo.IC_PRODUCT_CHARACTERISTICS
    WHERE (CHARACTERISTIC_CODE = 'TEXT')
    EXTERNAL JOIN C_IC_PRODUCT_CHARACTERISTICS.PART_CODE={?PROD - FIN: MAN_JOBS.STD_PROCESS_SPEC} AND C_IC_PRODUCT_CHARACTERISTICS.COMPANY_CODE={?PROD - FIN: MAN_JOBS.COMPANY_CODE}
    PROD - FIN
    SELECT "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."IC_MOVE_QUANTITY", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."TRANSACTION_TYPE", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."IC_LOT_NUMBER", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."WAREHOUSE", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."PERIOD_TXT", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."YEAR_TXT", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."DOCUMENT_NUMBER", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."PART_CODE", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."COMPANY_CODE"
    FROM   "fin_prod"."dbo"."KX_IC_MOVEMENTS_PRODCTN_IN_OUTS" "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"
    WHERE  "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."COMPANY_CODE"={?PROD - FIN: MAN_JOBS.COMPANY_CODE} AND "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."DOCUMENT_NUMBER"={?PROD - FIN: MAN_JOBS.JOB_NUMBER}
    EXTERNAL JOIN KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PART_CODE={?PROD - FIN: PRODUCT_MASTER.PART_CODE} AND KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE={?PROD - FIN: PRODUCT_MASTER.COMPANY_CODE}
    PROD - FIN
    SELECT "PRODUCT_MASTER"."PRODUCT_CLASS", "PRODUCT_MASTER"."COMPANY_CODE", "PRODUCT_MASTER"."PART_CODE"
    FROM   "fin_prod"."dbo"."PRODUCT_MASTER" "PRODUCT_MASTER"
    WHERE  "PRODUCT_MASTER"."PART_CODE"={?PROD - FIN: KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PART_CODE} AND "PRODUCT_MASTER"."COMPANY_CODE"={?PROD - FIN: KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE}
    PROD - FIN
    SELECT "KX_PRODUCT_MASTER_EXT"."PRODUCT_CLASS", "KX_PRODUCT_MASTER_EXT"."PART_CODE"
    FROM   "fin_prod"."dbo"."KX_PRODUCT_MASTER_EXT" "KX_PRODUCT_MASTER_EXT"
    WHERE  "KX_PRODUCT_MASTER_EXT"."PART_CODE"={?PROD - FIN: MAN_JOBS.STD_PROCESS_SPEC}

    As an update, I created a view in MS VIsual Studio and copied the SQL command set into a Crystal SQL command and made changes in the report to use the new CR SQL command.  It ran in seconds instead of hours.  There is something wrong with the way CR is building the SQL command when a CR SQL command is linked to a normal DB table.  HELP!  I started using the CR SQL command with only another 1 or 2 tables and it was slower but bearable.  This one uses more table and more data and dies.  Here is what the SQL command set looks like that I built in MS VS and used to create the CR SQL command.  This is from the Show SQL in CR.
    SELECT        dbo.MAN_JOBS.ACTUAL_START_DATE, dbo.MAN_JOBS.ACTUAL_START_DATE_2, dbo.MAN_JOBS.JOB_NUMBER,
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.DOCUMENT_NUMBER, dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.IC_LOT_NUMBER,
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.IC_MOVE_QUANTITY, dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PART_CODE,
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PERIOD_TXT, dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.YEAR_TXT,
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.TRANSACTION_TYPE, dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.WAREHOUSE,
                             dbo.PRODUCT_MASTER.PRODUCT_CLASS, dbo.KX_PRODUCT_MASTER_EXT.PART_CODE AS KX_PART_CODE,
                             dbo.KX_PRODUCT_MASTER_EXT.PRODUCT_CLASS AS KX_PRODUCT_CLASS, dbo.IC_PRODUCT_CHARACTERISTICS.CHARACTERISTIC_CODE,
                             dbo.IC_PRODUCT_CHARACTERISTICS.IC_DEF_CHAR_TEXT
    FROM            dbo.MAN_JOBS INNER JOIN
                             dbo.IC_PRODUCT_CHARACTERISTICS ON dbo.MAN_JOBS.COMPANY_CODE = dbo.IC_PRODUCT_CHARACTERISTICS.COMPANY_CODE AND
                             dbo.MAN_JOBS.STD_PROCESS_SPEC = dbo.IC_PRODUCT_CHARACTERISTICS.PART_CODE LEFT OUTER JOIN
                             dbo.KX_PRODUCT_MASTER_EXT ON dbo.MAN_JOBS.STD_PROCESS_SPEC = dbo.KX_PRODUCT_MASTER_EXT.PART_CODE AND
                             dbo.MAN_JOBS.COMPANY_CODE = dbo.KX_PRODUCT_MASTER_EXT.COMPANY_CODE LEFT OUTER JOIN
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS ON dbo.MAN_JOBS.COMPANY_CODE = dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE AND
                             dbo.MAN_JOBS.JOB_NUMBER = dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.DOCUMENT_NUMBER LEFT OUTER JOIN
                             dbo.PRODUCT_MASTER ON dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE = dbo.PRODUCT_MASTER.COMPANY_CODE AND
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PART_CODE = dbo.PRODUCT_MASTER.PART_CODE
    WHERE        (dbo.IC_PRODUCT_CHARACTERISTICS.CHARACTERISTIC_CODE = N'TEXT')

  • Member acces profile error(A table name, specified in an sql command)

    Hi friends,
    In my bpc application(A) below 3 dims are secure dims.
    1. entiiy  (std)
    2. category (std)
    3. location (custom dim)
    while defining one member access profile,
    Read Only      : CATEGORY 100
    Read & Write      : CATEGORY 200,500
    for whatever combinatio i use, for other secure dims (eg: category,location where base member,or parent members ) i'm getting below error  message
    A table name, specified in an sql command, is unknown.
    We are on bpc75nw sp04.
    Pls suggest us .
    dump(st22):
    Short text
        A table name, specified in an SQL command, is unknown.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "CL_UJE_MEMACCESS_CACHE========CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
         not caught in
        procedure "REMOVE_MEMACCESS" "(METHOD)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        An invalid table name "/1CPMB/RDWCSUMAS" was specified in an Open SQL command:
        Due to one of the following reasons, the error occurs only at runtime:
        - the table name was specified dynamically, or
        - the SELECT clause, WHERE clause, GROUP-BY clause, HAVING clause, or
          ORDER-BY clause was specified dynamically.
    Thanks,
    naresh
    Edited by: Naresh P on Feb 19, 2011 10:40 AM

    Hi Naresh,
    As far as I know You have specify Explicit Access to all the dimensions mentioned as Secured in your Application.
    You can't skip the secured Dimesions.
    In your case if you want to restrict only one dimension for 1 Member Access Profile then give Read & Write access to other 2 Dimensions and select ALL members.
    This might solve your problem.
    Hope it helps.
    Chaithanya

  • Datas deletion from Global Temporary table  when clear command is given

    Dear All,
    How to Delete datas from global temporary Table when clear command is given in forms
    Suggest me syntax..
    Pls help..
    Regards,
    Gokul.B

    http://psoug.org/reference/gtt.html
    Francois

  • Using unlinked sql command and table in a subreport

    All,
    Does CR allow using an unlinked sql command and a table in the same subreport?  I am passing the CurrentCEUserName from the main report to the sql command in the subreport (via linked parameter).  The sql command then executes a query to pass the parameter to the database (example: select myfunction('{?myparam}' from dual).  I need this to run before subreport's table query is executed. 
    This all appears to work except that the parameter passed to the sql command isn't set when the command executes.  The value is always null when the sql command is executed.  If I add the parameter to the report output it shows the expected value. 
    Also, if I have a subreport that just has a single sql command the parameter is set correctly prior to executing the command.
    any help would be appreciated.
    thanks!

    If you are looking for Crystal to run the SQL Command, then the SQL it generates itself, I think the answer is no, it won't do that.  Crystal expects all of the data sources to be linked, I believe.  I'm not sure what you would expect to happen if they are not...  However, you can make your SQL Command something like (MS SQL; sorry, it's been too long since I've used Oracle...):
    declare @result varchar(100);
    set @result = ( select myfunction('{?myparam}') );
    select * from table;
    which would run the first select calling your function, basically throw away the result (or you can do with it as needed), then return the fields from your table.
    HTH,
    Carl

  • How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?

    How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?
    I tried using DROP Tables, Truncate Database, Delete and many more but it is not working.  I want to delete all tables using Query Analyzer, i.e. through SQL Query.
    Please help me out in this concern.
    Nishith Shah

    Informative thread indeed. Wish I saw it early enough. Managed to come up with the code below before I saw this thread.
    declare @TTName Table
    (TableSchemaTableName
    varchar
    (500),
    [status] int
    default 0);
    with AvailableTables
    (TableSchemaTableName)
    as
    (select
    QUOTENAME(TABLE_SCHEMA)
    +
    +
    QUOTENAME(TABLE_NAME)
    from
    INFORMATION_SCHEMA.TABLES)
    insert into @TTName
    (TableSchemaTableName)
    select *
    from AvailableTables
    declare @TableSchemaTableName varchar
    (500)
    declare @sqlstatement nvarchar
    (1000)
    while 1=1
    begin
    set @sqlstatement
    =
    'DROP TABLE '
    + @TableSchemaTableName
    exec
    sp_executeSQL
    @sqlstatement
    print
    'Dropped Table : '
    + @TableSchemaTableName
    update @TTName
    set [status]
    = 1
    where TableSchemaTableName
    = @TableSchemaTableName
    if
    (select
    count([Status])
    from @TTName
    where [Status]
    = 0)
    = 0
    break
    end

  • DELETE TABLE STATEMENT WITHIN A LOOP IN A PROCEDURE

    i am using delete table tablename statement inside a cursor for loop which is inside a procedure
    it is telling error in that delete statement
    can't i put it inside the loop

    you can only run DDL commands like create, drop etc in pl/sql by using "execute immediate" or dbms_sql package. when you use either of the two mentioned , it will work anywhere in PL/SQL , yes even in a loop. Note that the commit on DDL are implicit , so take care of your transactions if any ..
    --Samson                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Query Builder (Express Edition 10g) is not working in Google Chrome

    Google Chrome is not properly displaying table in SQL Query Builder (Oracle Database Express 10g). It is not possible to select all fields of given table because not all fields are displayed and I can't go down to select last field. In Mozilla Firefo

  • IP address used by another computer

    New to iMac. Keep getting msg that says IP address is being used by another computer. Have read Mr. Bob Timmons posts.  His post are very helpful.  So far, still haven't been able to solve on my own.  I have an AT&T combo modem/router configured to o

  • How to create an entry in Badi Filter table T77HAP_FLT_PRP

    How to create an entry in Badi Filter table T77HAP_FLT_PRP

  • RSCMSIM ::: Message 404: (Not Found)

    Hi, during import of content repository, already exported with RSCMSEXL, RSCMSIM ends with this message: Message 200: (OK) Message 404: (Not Found) Is it OK? What is the problem? Regards.

  • Why is my MacPro so SLOW at everything?

    Ok, I 've been using my MacPro for the past 2 weeks and I must say it has been a headache. Hopping between apps is really slow and the overall system performance in slower than my older 1.8 GHz DP G5. I do a lot of heavy Photoshop (CS2) work daily an