Case Statement ....please help :)

Hi Guys\Gals,
Just wondering if anyone can tell me the correct usage of the case statement:)
I want to select counts for particular date ranges to come out as seperate columns.
Is the Sql Server Case appliable in oracle circumstances?
This is what im doing:
select count(case when to_char(logtime,'MM') = '01' then source else 0 end) as January
from messagetransactionlog
SQL Error: ORA-00932: inconsistent datatypes: expected CHAR got NUMBER
Then im getting something like from keyword not found!!
Plz help :)
Thanks
Robert

Hopefully im not boring people now :)
can the case statement, as follows:
count(case when logtime = '07-07' then UNIQUES else null end) as Jul
be changed to only count distinct rows?
count distinct (case when logtime = '07-07' then UNIQUES else null end) as Jul
#SQL Error: ORA-00923: FROM keyword not found where expected
count (case when logtime = '07-07' then distinct UNIQUES else null end) as Jul
#SQL Error: ORA-00923: FROM keyword not found where expected

Similar Messages

  • Hello. I am having much difficulty using any software drum program. I am trying to use EZ Drummer and the drum programs in Logic, with limited success. I was using them, and they were working, but this is no longer the case. Please help me navigate my way

    Hello.
    I am having much difficulty using any software drum program. I am trying to use EZ Drummer and the drum programs in Logic, with limited success. I was using them, and they were working, but this is no longer the case. Please help me navigate my way through these issues, if possible.
    Thanks.
    Eric

    Aha! I have sorted it.
    For those with similar problems, the solution is this:
    Macintosh HD > Library > Audio > MIDI Drivers
    Then delete DigiDioMidiDriver.plugin

  • Why I receive started 2 hours the message that I must put my password on Iclod for my apple id and when I put the password I receive the message that the paswor is not god!What can I make in this case?Please help me

    why I receive started 2 hours the message that I must put my password on Iclod for my apple id and when I put the password I receive the message that the password is not god!What can I make in this case?Please help me

    Hi it sounds like a scam delete Email
    bsydd uk

  • Need help with case structures- please help :)

    Hey all.
    I'm currently trying to program a infrared furnace. I'm setting a temperature, subtracted my set temperature from the actual temperature (thermocouple hooked up to SCB-68), and voltage is being sent to the controller of the furnace accordingly. However, I need to hold the set temperature for a certain amount of time. I need help programming this: when the VI reads the set temperature from the thermocouple, it results in a timer running down. When the timer runs down to 0, the While Loop ends. I'm thinking case structures is most appropriate, but if you have a better suggestion, please let me know.
    Thanks

    You should probably implement a state machine.
    The state machine would keep track of the temperature and making ajustments on a timely basis.
    There is a template of a state machine is you select under the File menu > New > From Template.
    You can also look under Help > Find Example > and do a search for state machine.
    There are lots of state machine examples on this forum, some of which may be quite useful.
    RayR

  • SQL STATEMENT , PLEASE HELP

    Hi,
    I want some help in writing a SQL Query .Its besically a hierarchical query. Let me lay down the table structure first to explain my requirements better.
    PORP_TABLE(NODE_LEVEL int, WBS_ID int, WBS_NUMBER varchar(60), LFT int,RGT int)
    SELECT NODE_LEVEL, WBS_ID, LFT,RGT FROM PROPOSAL_WBS PW WHERE PROPOSAL_REV_ID = 7000
    (SAMPLE DATA)
    NODE WBS
    LEVEL WBS_ID NUMBER LFT RGT
    0 7055 ROOT 1 24
    1 7056 1 2 5
    1 7088 2 6 9
    2 7057 1.1 3 4
    2 7089 2.1 7 8
    2 7091 3.1 11 14
    2 7103 3.2 15 16
    2 7105 4.1 19 20
    1 7090 3 10 17
    3 7092 3.1.1 12 13
    1 7104 4 18 23
    2 7106 4.2 21 22
    ALLOCATION_DETAIL( WBS_ID int, COST_ID int, PERIOD Date, AMOUNT Float)
    sample data
    WBS_ID , COST_ID , PERIOD , AMOUNT
    7057 100 01-jan-2005 5000
    7057 100 01-feb-2005 2000
    7057 100 01-mar-2005 1000
    7057 100 01-apr-2005 6000
    7057 100 01-may-2005 3000
    7057 100 01-jun-2005 45000
    7106 100 01-mar-2005 8000
    7106 100 01-apr-2005 7000
    7106 100 01-may-2005 9000
    Now the PORP_TABLE has got the parents and childs. Only the leaf nodes in the hierarchy has the values stored in the ALLOCATION_DETAIL table. Now here is the scenario
    In the example 7055 is the root WBS . The Leaf WBS are the one with max extension in the wbs number ( in this case it is 1.1, 2.1, 3.1.1, 3.2, 4.1 and 4.2)
    Now the Starting period for each leaf node in the ALLOCATION_TABLE could be differrent . What that means is WBS 1.1 could start in Jan -2003 and WBS 3.1 Could be Jul-2005 . So the ending perios are also differrent for differrent WBS . Some can span 2 years some can 5 years.
    So how to write a query so it retrieves the value for all the Wbs starting from the MIN ( PERIOD ) upto the MAX(PERIOD), and it should roll up also. Now there is No connect by Prior or any analytic functions available for this . THIS NEEDS TO BE DONE ONLY THROUGH TRADITIONAL SQL STATEMENT . And NO DB FUNCTIONS CAN BE USED .
    Now if the WBS is a parent node then it should have the sum of all its child nodes for the COST category.
    SO THE RESULT SET SHOULD BRING LIKE THIS
    WBS_NUMBER, PERIOD_NUMER, COST_CATEGORY , AMOUNT
    ROOT
    1
    1.1
    2
    2.1
    3
    3.1
    3.1.1
    3.2
    4
    4.1
    4.2
    ......

    Thanks for all your thoughtfull replies and feedbacks. Yes it is in Sybase platform . Though I have been woking all along in Oracle , Unfortunately this one is in Sybase, and no the customer cant and wont move to Oracle. So I have to work with it . And if you want to see the table structure . Here are they :
    CREATE TABLE PROPOSAL_WBS (
    BURDEN_CENTER_ID      numeric(18,0) NULL,
    START_DATE      datetime NULL,
    END_DATE      datetime NULL,
    WBS_ID      int NOT NULL,
    MODIFIED_DATE      datetime NULL,
    CREATED_DATE      datetime NULL,
    MODIFIED_BY      varchar(127) NULL,
    CREATED_BY      varchar(127) NULL,
    FEE_PERCENT      float NULL,
    PROPOSAL_REV_ID      int NOT NULL,
    PARENT_WBS_ID      int NULL,
    NAME      varchar(127) NULL,
    COMMENT      varchar(255) NULL,
    TARGET_COST      float NULL,
    MONTHS_REMAINING      int NULL,
    DEFAULT_STAFF_FTE      float NULL,
    ANNUAL_GRA_SALARY      float NULL,
    NUMBER_OF_GRA      int NULL,
    MANAGEMENT_ADJUSTMENT_TOTAL     float NULL,
    MA_UNALLOCATED_FUNDS      float NULL,
    FEE_TOTAL      float NULL,
    FEE_UNALLOCATED_FUNDS      float NULL,
    TRAVEL_COMMENTS      varchar(255) NULL,
    ODC_COMMENTS      varchar(255) NULL,
    SORT_ORDER      int NULL,
    LFT      int NULL,
    RGT      int NULL,
    NODE_LEVEL      int NULL,
    WBS_NUMBER      varchar(50) NOT NULL,
    TOTAL_COST      float NULL,
    TOTAL_COST_PLUS_FEE      float NULL,
    PER_MILE_COST      float NULL,
    PER_DIEM      float NULL,
    TAX_RATE      float NULL,
    RENTAL_CAR_PER_DAY_COST      float NULL,
    TAXI_PER_TRIP_COST      float NULL,
    CONSTRAINT PK_PROPOSAL_WBS PRIMARY KEY(WBS_ID)
    CREATE TABLE PROPOSAL_WBS_ALLOC_DETAIL (
    WBS_ID      int NOT NULL,
    OBJECT_CODE_ID      numeric(18,0) NOT NULL,
    PERIOD_NUMBER      int NOT NULL,
    ALLOCATION_AMOUNT     float NULL,
    PERIOD_YEAR      datetime NULL,
    CONSTRAINT PK_PROPOSAL_WBS_AD PRIMARY KEY(WBS_ID,OBJECT_CODE_ID,PERIOD_NUMBER)
    CREATE TABLE WBS_PERIOD (
    PERIOD_NUMBER     int NOT NULL
    CREATE VIEW WBS_COST_CAT AS
    SELECT PROPOSAL_WBS.PROPOSAL_REV_ID,
    PROPOSAL_WBS.WBS_ID,
    PROPOSAL_WBS.NAME, PROPOSAL_WBS.SORT_ORDER,
    PROPOSAL_WBS.NODE_LEVEL, PROPOSAL_WBS.WBS_NUMBER,
    CODES.CODE_ID COST_CATEGORY, CODES.CODE_NAME COST_CAT_NAME
    FROM PROPOSAL_WBS, CODES
    CREATE TABLE CODES (
    CODE_ID      numeric(18,0) NOT NULL,
    CODE_VALUE      varchar(254) NULL,
    CODE_NAME      varchar(254) NULL,
    CODE_TYPE      numeric(18,0) NULL,
    CODE_PARENT_ID     numeric(18,0) NULL,
    CONSTRAINT PK_CODE_ID PRIMARY KEY(CODE_ID)
    So let me explain little bit more . The WBSs are categorized into two differrent types. One as INPUT and the second one as NON INPUT. Now assme the the WBS in a tree structure . So only the LEAF WBSs will have the AMOUNT and they are the INPUT WBSs and all non leaf WBSs are NON INPUT. Now lets say there are 5 LEAF WBSs. Each LEAF WBS will have differrent start period ex: WBS 1.1 starts in January 2003 and goes for 48 periods . WBS 2.1 starts in November 2003 and goes for 35 periods . WBS 3.1 starts in March 2004 and goes for 52 periods. and so on .
    Now as there is no Allocation Amount entry for all other WBSs except the LEAF WBSs. So how do I get the roll up . For example if you imagine the parent of WBS 1.1 is WBS 1 , and the parent of WBS 2.1 is WBS 2 and the Parent of WBS 3.1 is WBS 3 , and the parent for WBS 1, WBS 2, WBS 3 is "ROOT WBS". As I said there is no entry for WBS 1, WBS 2 , WBS 3 and the "ROOT WBS". So how do I have a roll up of the Leaf WBS data for their parent WBSs.
    Now if u think of the data in a matrix report, the WBSs and the COST CATEGORY will be the row values, the Period Numbers will the column values and the Allocation Amount will be the cross values. so lets say the WBS 1 has got two leaf nodes, WBS 1.1 and WBS 1.2 then WBS 1 will have the summed amount for each period starting the minumum period of the two of its leaf nodes and for all the cost categories of both the leaf nodes. and the "ROOT WBS" will have all the cost categories of al the Leaf nodes . for all the periods , period wise.

  • Control Break Statements ----- Please Help me

    I have some idea about the control-break statements(AT-ENDAT). Can any one please give me the example ?
    Thanks in Advance. Points will be rewarded immediately.

    sample program for AT events
    Using AT FIRST , AT NEW, AT THE END OF , AT LAST.
    DATA: BEGIN OF ITAB OCCURS 0,
    F1 TYPE I,
    F2(6) TYPE C,
    F3(10) TYPE N,
    F4(16) TYPE P DECIMALS 2,
    END OF ITAB.
    DATA: SUB_TOT(10) TYPE P DECIMALS 3.
    **--1
    ITAB-F1 = 1.
    ITAB-F2 = 'ONE'.
    ITAB-F3 = 10.
    ITAB-F4 = '1000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 1.
    ITAB-F2 = 'ONE'.
    ITAB-F3 = 20.
    ITAB-F4 = '2000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 1.
    ITAB-F2 = 'ONE'.
    ITAB-F3 = 30.
    ITAB-F4 = '3000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    *--2
    ITAB-F1 = 2.
    ITAB-F2 = 'TWO'.
    ITAB-F3 = 10.
    ITAB-F4 = '1000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 2.
    ITAB-F2 = 'TWO'.
    ITAB-F3 = 20.
    ITAB-F4 = '2000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 3.
    ITAB-F2 = 'THREE'.
    ITAB-F3 = 10.
    ITAB-F4 = '1000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 3.
    ITAB-F2 = 'THREE'.
    ITAB-F3 = 20.
    ITAB-F4 = '2000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    SORT ITAB BY F1.
    LOOP AT ITAB.
    AT FIRST.
    WRITE: /35 ' MATERIAL DETAILS:'.
    ULINE.
    ENDAT.
    AT NEW F1.
    WRITE: / 'DETAILS OF MATERIAL:' COLOR 7 , ITAB-F1.
    ULINE.
    ENDAT.
    WRITE: / ITAB-F1, ITAB-F2, ITAB-F3, ITAB-F4.
    SUB_TOT = SUB_TOT + ITAB-F4.
    AT END OF F1.
    ULINE.
    WRITE: / 'SUB TOTAL :' COLOR 3 INVERSE ON, SUB_TOT COLOR 3 INVERSE ON.
    CLEAR SUB_TOT.
    ENDAT.
    AT LAST.
    SUM.
    ULINE.
    WRITE: 'SUM:', ITAB-F4.
    ULINE.
    ENDAT.
    ENDLOOP.
    Reward points if helpful.
    Rgds,
    Abhishek

  • Sms in enroute state please help

    hi all,
    From an ESME we are sending sms through smpp and the client code gets the smsc ok response still its not able to deliver the message for a long time and some times it dont even deliver the sms .We tried with the different sending priorities like min norm high ,still the issue is not closed .While enquiring it says that the message is in enroute state.Upto my understanding the problem is in SMSC, but still they are not able to trap it out. If anybody worked with an smsc server can help us atleast which would be great. If the posted info is not enough i will give more info as u need.Hope I will get help
    Thanks in advance.

    Hi,
    I used 2 programs with smpp 3.4 spec to test the submit function of the test class in smppapi. I made 2 queries with their messageid and found the followings:
    Success: Query response (query_resp: (pdu: 44 80000003 0 3) 4651A8CA 040820032314032+ 2 0 )
    Failure: Query response (query_resp: (pdu: 28 80000003 0 3) 610CBF1E 1 0 )
    May I ask what reasons will cause that failure of sending a SMS? '1' seems the enroute state.
    Thanks

  • Missing Return Statement - Please Help

    I get the "missing return statement" in line 47 in the getNumber method when I try to compile. Any suggestions?
    import java.util.Scanner; //imports scanner
    import java.util.Random;  //imports class Random
    public class Guess {
        Random randomNumbers = new Random();
        int answer;
        int userGuess;
        public void newGame()
            int answer = getNumber();
        public void play()
           Scanner input = new Scanner( System.in ); //creates scanner input
           System.out.println("\n\n Guess a number between 1 and 1000 or just" +
                   "press 0 to exit:" );
           userGuess = input.nextInt();
           while (userGuess != 0);
               checkUserGuess();
               System.out.println("Please enter another guess:");
               userGuess = input.nextInt();
        public int getNumber()
           int answer = 1 + randomNumbers.nextInt( 1000 );
        }  //ERROR IS DISPLAYED HERE
        /** Creates a new instance of Guess */
        public void checkUserGuess()
            if ( userGuess >= answer)
                System.out.println("Your guess is too high, try again");
            else
                if ( userGuess <= answer)
                    System.out.println("Your guess is too low, try again");
                else
                    System.out.println("Congratulation, you guessed correctly");
    }

    The error message says it all.
    You declared your getNumber method as returning integer.
    However you didnt return any number.
    add the reutrn statement to the method
    return answerJust to add, you have declared answer as global
    variable and agian answer as local variable.
    You are messing up a little there.
    Message was edited by:
    lupansansei

  • Unsure of syntax for SQL SELECT statement, please help

    I am trying to execute the following SQL statement:
    ResultSet rs = stB.executeQuery("SELECT quantity FROM stocklevels WHERE code=salesCode[x]");where SalesCode is an integer array and x is a counter used to loop this part of the code. I keep getting the "syntax error - missing operator" message when I run the code and get to this line, can anybody please tell me the correct syntax/form to use? Many thanks.

    Is salesCode an array in Java or in your DB? I don't know anything about SQL arrays, so I'll assume it's in your Java code.
    You want to put the value of salesCode[x] into the query--say 123456. But what you've got is like doing System.out.println("The code = salesCode[x]"); and then wondering why you're seeing "salesCode[x]" instead of "123456. You'd need to do System.out.println("The code = " + salesCode[x]); Similarly, you could take the "salesCode[x]" out of the string literal that's forming the query, in order to have it evaluated as an int and stuffed into the string as "123456". It would be better to use a PreparedStatement though: ps = con.prepareStatement("select .... where code = ?");
    ps.setInt(1, salsedCode[x]);
    rs = ps.executeQuery();

  • Instances stuck in running state--please help

    Hi,
    We have a composite with all synchronous processes with synchronous calls.
    We have a lot of running instances in the EM console and when we check the audit trail and the flow of many instances, the flow is completed successfully but the instances are still present in the running state. Many of the instances are in between the flow and are not completing at all. They are stuck at that point and never complete.
    This we assume was due to some abnormal activity like the database being full or shutting down of composite when bpel instances were in running state.
    Can anyone tell me why such kind of thing had happened and how to handle these cases.
    Thank you.

    R,
    I am assuming that you are also working with SOA Suite 11g.
    I too had the same issue and was tuning the Bpel Engine but i was not able to get rid of it .
    When i submitted a SR they responded that it was bug in 11.1.3 and they are working on it.
    Hoping that we would get a patch soon.
    Thanks,
    Tirumala Dixit.

  • Flash Buttons - "i've been there" state - PLEASE HELP !!

    Hi All,
    I am trying to design an interactive flash piece, where, once
    the button has been clicked, it goes to:
    Firstly: a state that says ... "im here"
    When another button has been selected (clicked), the first
    button shows
    a state that says ... "I've already been clicked"
    I've already worked out the first part, but cant work out how
    to do the
    "I've already been clicked" state ... is it actionscript ???
    If so, HOW ???
    Please Help

    Hi All,
    I am trying to design an interactive flash piece, where, once
    the button has been clicked, it goes to:
    Firstly: a state that says ... "im here"
    When another button has been selected (clicked), the first
    button shows
    a state that says ... "I've already been clicked"
    I've already worked out the first part, but cant work out how
    to do the
    "I've already been clicked" state ... is it actionscript ???
    If so, HOW ???
    Please Help

  • Need help with mounting mobo to Jetmaster Jr. case! Please help, dont want to fry it!

    Well, I have had my computer parts laying around for a few weeks waiting on my pretty PSU. Everything is finally here, so I prep the motherboard and get ready to mount it to the case (Aerocool Jetmaster Jr, thought it looked cool--should have probably gone more generic). Anyway, I go to to screw in the gold spacers that came with the case when I notice the holes that I need to mount the motherboard into are bumps instead of drilled holes like on all the previous cases I have used.
    So, that translates into my motherboard is going to be sticking out too far. Precisly, it is too far out by the exact lenght of the spacers which means that these prefab. bumps in the case are made like that for a reason (obviously). My question is, if I mount without the spacers am I going to fry my board? And, why the hell did they supply spacers if they made prefab. bumps in the first place? They did supply paper washers, so I have thought about using them.
    Any suggestions? Anybody have this case or one with prefab. bumps? Thanks!

    My standoffs are built into my case. My question is really a question about grounding my motherboard. I guess I should have clarified.
    My question is, my moterboard is only touching metal at these standoffs, is that how the motherboard is grounded? Or, is this going to fry my board?
    From other posts I have looked at, this seems fine and how the motherboard is suppose to be grounded. But, I am scared I am going to fry my new computer and don't want to make that mistake. So, I was just wondering if it is proper for the motherboard to be touching at the standoffs, of is that wrong?
    Thanks

  • Case Statement and Sequential Count

    I would like to obtain user input via a prompt and use what the user selects in my OBIEE Report case statement. I ve done the parameter part with a presentation variable.
    and a filter with the following.
    Recv Date is between @{Repair_Start_Date}{01-01-2013} and @{Repair_End_Date}{01-01-2013}
    Now I would like to have a sequential count of the records that meet the case statement, please advise.
    For example &START_DATE AND &END_DATE are user inputs:
    CASE when SHIP_DATE BETWEEN &START_DATE AND &END_DATE THEN 1
    Thanks

    Hi,
    Here is a way you could try.
    CASE when SHIP_DATE BETWEEN &START_DATE AND &END_DATE THEN RSUM(1) END
    So, what it does?
    Whenever the CASE statement is satisfied, it increments 1 by 1.
    Hope this helps.
    Thank you,
    Dhar

  • I'm a newbie and I worry that I will have problem(s) with billing. Please help me.

    I'm a foreigner in Korea, a place which is a bit unfriendly with Apple.
    I just got my iPad, 3 days ago, put in my Master Card No. (through the computer) and I decided to buy an app in the computer's iTunes. Unfortunately, I had purchased/bought and downloaded an iPhone app (my dumbness!) and I can't use it. When I check my account in the iPad, it says there that I have no Banking information at all.
    I'm worried cause when I checked my iTunes in the computer, my banking account was gone. Also, there is no any deduction on my bank figures.
    Do you have any idea regarding my case? Please help me.

    That majority of iPhone-apps can be used on iPads, it's those that require full-phone capability that aren't compatible (and potentially if you don't have the relevant iOS version on your iPad) - an app's requirements (including the devices that it's compatible with) should be listed on its description page in the store. If it is compatible then you can redownload it (as long as it's still in the store) via the Purchased tab in the App Store app on your iPad.
    After downloading the app on your computer's iTunes you didn't then remove your payment details, and the app was a paid-for app (it didn't have 'get' against it in the store, which would mean that it was free to download) ? Does it show on your account's purchase history as paid-for or free : See your purchase history in the iTunes Store - Apple Support ?
    If it was a paid-for app then it can take a few days for the purchase to show on a credit card. And if iTunes wasn't able to collect the money for it then does anything show on the payment details screen that you owe money - or the next time that you try to download anything you will get a message along the lines of 'there was a problem with previous purchase' if you owe iTunes money.

  • Please Help in ORACLE SPOOL File

    Hello All,
    I made oracle Spool file.Generally i m calling a FUNCTION which return a REFCURSOR.
    ----Package Spec------------------------
    CREATE OR REPLACE PACKAGE Axspointrpt IS
    TYPE return_cur IS REF CURSOR ;
    -- # Updates to the SOI and associated CARMA user ids
    FUNCTION F_UPDATION_USERID_RPT RETURN return_cur ;
    END Axspointrpt;
    ----Package Body------------------------
    CREATE OR REPLACE PACKAGE BODY Axspointrpt IS
    FUNCTION F_UPDATION_USERID_RPT
    RETURN return_cur IS
    VCur return_cur;
    BEGIN
    OPEN VCur FOR
    SELECT
    ID_SCTY,ID_SYMBOL,NM_SHORT,S.DT_MNT_LST,S.ID_MNT_LST,LTRIM(RTRIM(CARMA_FINAL.F_Getusername(S.ID_MNT_LST))) USERNAME,DECODE(IN_DELETED,'Y','YES','N','NO') ACTION
    FROM SOI_MASTER S,APP_USER A
    WHERE S.ID_MNT_LST=A.ID_MNT_LST;
    RETURN VCur;
    EXCEPTION
    WHEN OTHERS THEN
    IF (VCur%isOpen) THEN
    CLOSE VCur;
    END IF;
    END F_UPDATION_USERID_RPT ;
    -----------callRPT.sql ------------------
    SET MARKUP HTML ON SPOOL ON HEAD "<TITLE>SQL*Plus Report</title> -"
    SET ECHO OFF
    SET PAUSE OFF
    SET VERIFY OFF
    SET FEEDBACK OFF
    SET HEADING ON
    SET LINESIZE 150
    set PAGESIZE 85
    SET TRIMSPOOL ON PAGESIZE 50
    SPOOL D:\Avinash\employee.htm
    select Axspointrpt.F_UPDATION_USERID_RPT from DUAL;
    clear breaks
    TTITLE OFF
    SPOOL OFF
    SET MARKUP HTML OFF
    SET ECHO ON
    When i run this SQL file then i am getting the procedure name as well as CURSOR STATEMENT along with the table data.I want get Hide the procedure namd,and cursor statement.Please help in this.
    Regards,
    [email protected]

    Hi Avinash,
    Try this:
    create or replace package dump_refcursor_test is
    type return_cur is ref cursor;
    function get_data return return_cur;
    end dump_refcursor_test;
    create or replace package body dump_refcursor_test is
    function get_data return return_cur
    is
    l_cur return_cur;
    begin
    open l_cur for select 'qwerty' from dual;
    return l_cur;
    end get_data;
    end dump_refcursor_test;
    Create a file called spool.sql put it in c:\. Put his in the file:
    SET NEWPAGE 0
    SET SPACE 0
    SET LINESIZE 80
    SET PAGESIZE 0
    SET ECHO OFF
    SET FEEDBACK OFF
    SET HEADING OFF
    SET MARKUP HTML OFF SPOOL OFF
    set sqlprompt "".
    var res refcursor;
    exec :res:= dump_refcursor_test.get_data;
    spool c:\spool_output
    print res
    spool off
    Now go to sql*plus and type this:
    @c:\spool.sql
    This will give you a file with only the data, here "qwerty"
    Regards Pete

  • ITHMB converter to Win XP? URGENT PLEASE HELP!

    I have about 200 pictures on my Windows XP PC that are from my iPhone. I took a bunch of pictures that I need this Friday for a court case. I can't open them! I no longer have the iPhone, only the pics. I looked everywhere I can imagine for a file converter program to no avail. What is needed to open these .ITHMB pictures?!? If I use a MAC will I be able to see them? Can probably rent one at a Kinkos for awhile if that's the case. Please help...

    I bet I have to find someone with a MAC, as I doubt that anyone at Kinkos will let me download a program onto their machines...thank you though for your suggestion! It's a good last resort - post to craigslist maybe for a MAC user as I don't know anyone with one

Maybe you are looking for

  • Questions about Using Itunes for Nano. New User

    Hi everyone! i am a new ipod user that is new to the itunes software. I have a few questions regarding making playlists and transferring them into the ipod nano and deleting songs from the ipod nano thru itunes or the device. Can someone provide a li

  • Need suggestion for a burner and set up....

    Hi Last week I downloaded latest addition of I-tunes and have imported some songs. I want to put on a basic CD for listening in car. My computer (windows XP Home) doesn't have a built in CD burner so I need to purchase an external CD burner. I just n

  • Unanswered questions on Quiz are not counted correctly when going back

    Hi, I'm using Captivate 8, and made a simple multiple choice quiz, with a "submit all" option. It works fine, except for when using the back button. When trying to submit, I get the following message: "One or more questions is incomplete. Answer all

  • How do I enable telnet links in FF8?

    Following all of the previous links about adding UI handlers didn't work. I can't find any combination that will open a telnet session when a telnet:// link is clicked. I get the "Firefox doesn't know how to open this address..." error. Thanks in adv

  • Multiple Queues(Content Specific) - Can't get more than two queues

    Hi, I have a ccBPM scenario, which collects messages read by the file adapter and then sends them grouped. It's working fine in many different configurations, but I'd like to configure it in a way described in the PDF "How Tou2026 Configure Inbound P