Empty query result into variable? what's the result

It's Null Value or What?
i write a query like this.
select name into variable from table where pk is null;
/*this query return nothing*/
/*Variable = Null or variable is empty ?*/

Generally, the contents of the variable do not change if a SELECT..INTO.. returns no rows.
It is safer to have your NO_DATA_FOUND exception handler set the variable to an appropriate value (eg null).

Similar Messages

  • If empty internal table in select for all entries what is the result?

    In select all entries statement , if empty internal table is there then  what is the result.

    Hello,
    If the table is empty then it will select all the records table....
    To aviod this u have check the body of the itab.
    If not itab[] is intial.
    select * ....
    endif.
    I useful reward.
    Vasanth

  • While loading transaction data into cube what are the tables generats

    Hi,
    while loading transaction data into cube what are the tables normally generats.

    Hi,
    Normally datas will be loading to 'F'- Fact tables (/BIC/F****) *** - cube name..
    When you do compress the request the data will be moved into E tables.
    Regards,
    Siva.

  • What is the result of using the "post tax payable" option in the advance ta

    what is the result of using the "post tax payable" option in the advance tax report - program rfumsv00? I know it will then post the input and output tax to the tax payable GL account. But from point of view of reporting, when you run the advance tax report, will there be any change after doing this posting to tax payable account?

    Basic communication aside, J2EE is mostly a synchronous run-time environment. When asynchrony is introduced, a whole new set of infrastructure requirements is needed to support QoS and commercial-quality implementations. In other words, it's not just about API anymore, it's about reliable communication, exception handling, time outs, etc. You may want to look at this Q&A to see some of the benefits provided by J2EE as underlying run-time for orchestration:
    http://searchwebservices.techtarget.com/ateQuestionNResponse/0,289625,sid26_cid511195_tax292928,00.html
    Doron\
    Download Collaxa 2.0
    http://www.collaxa.com

  • What is the result this in access sequence exclusive not marked

    Hi Gurus,
    In pricing access sequence v/07 if we did not mark the exclusion what will hapeen.  In that access sequence it contain 3 tables i did not mark as exlusion what will happen.  What is the result of this. 
    Thanks &  Regards
    Points will be rewarded

    Hi lakshmi pathi
    Thanks for your replay.  When am maintaining condition record in vk11 all condition recordds  coming.  In that am selecting am maintaing.  Even though if i put exclusive indicator in access sequcne even though same records am getting in the same order.\
    please clarify on this
    Thanks & Regards
    points will be rewarded

  • Whats is the result of statement datamy_flight type s_flight

    Hi Folks,
    I have just started learning ABAP.
    And i have following queries in mind.
    what is the result of the following statement
    data my_flight type s_flight occurs 10 with headerline.
    regards,
    Nithin

    You had to have some kudos for the effort put in to your thread as week as the point you make.

  • Apex report result doesn't agree with the result of sql developer

    Hello guys,
    at the moment I try to create a standard report which takes his content from several spreadsheets. Because of some problems with the searchbar I'm not able to use an interactive report. The sql query contains a function, which sets some space characters into the content of a column. But there is a big problem. When I call my sql query in apex from the spreadsheets the result doesn't agree with the result which affords the sql developer.
    I know that the sql developer affords the right result.
    best regards
    wderr
    Edited by: user9072567 on 07.02.2010 12:57

    thats the query:
    select "TWORKITEM"."WORKITEMKEY",
    "TWORKITEM"."PROJCATKEY",
    "TPROJECT"."LABEL",
    "TWORKITEM"."PACKAGESYNOPSYS",
    replace(replace("TWORKITEM"."PACKAGEDESCRIPTION", chr(10), '<br>'),'<td></td>','&lt;td&gt;&lt;/td&gt;') packagedesc,
    suche_ohne_ti_be("TWORKITEM"."WORKITEMKEY") "CHANGEDESCRIPTION"
    from "TWORKITEM" "TWORKITEM", "TPROJECT" "TPROJECT", "TPROJCAT" "TPROJCAT"
    where "TWORKITEM"."PROJCATKEY" = "TPROJCAT"."PKEY"
    and "TPROJCAT"."PROJKEY" = "TPROJECT"."PKEY"
    and (instr(upper("TWORKITEM"."WORKITEMKEY"), upper(nvl(:P10_SEARCHTEXT, "TWORKITEM"."WORKITEMKEY"))) > 0
    or instr(upper("TPROJECT"."LABEL"), upper(nvl(:P10_SEARCHTEXT, "TPROJECT"."LABEL"))) > 0
    or instr(upper("TWORKITEM"."PACKAGESYNOPSYS"), upper(nvl(:P10_SEARCHTEXT, "TWORKITEM"."PACKAGESYNOPSYS"))) > 0
    or instr(upper("TWORKITEM"."PACKAGEDESCRIPTION"), upper(nvl(:P10_SEARCHTEXT, "TWORKITEM"."PACKAGEDESCRIPTION"))) > 0
    or instr(upper(suche_ohne_ti_be("TWORKITEM"."WORKITEMKEY")), upper(nvl(:P10_SEARCHTEXT, "TWORKITEM"."WORKITEMKEY")))>0
    I mean with spreadsheets some tables/charts. And I take those informations from 3 of them.
    regards
    wderr

  • SQL query with multiple tables - what is the most efficient way?

    Hello I am learning PL/SQL. I have a simple procedure where I need to find number of employees and departments per location as per user input of location_id.
    I have 3 Tables:
    LOCATIONS
    location_id (pk)
    location_name
    DEPARTMENTS
    department_id (pk)
    location_id (fk)
    department_name
    EMPLOYEES
    employee_id (pk)
    department_id (fk)
    employee_name
    1 Location can have 0-MANY Departments
    1 Employee has 1 Department
    Here is the query I came up with for PL/SQL procedure:
    /*Ecount, Dcount are NUMBER variables */
    SELECT SUM (EmployeeCount), COUNT(DepartmentNumber)
         INTO Ecount, Dcount
         FROM     
         (SELECT COUNT(employee_id) EmployeeCount, department_id DepartmentNumber
              FROM employees
              GROUP BY department_id
              HAVING department_id IN
                        (SELECT department_id
                        FROM departments
                        WHERE location_id = userInput));
    I do get the correct result, but I am just wondering if my query is on the right track and if there is a more "efficient" way of doing this.
    Thanks in advance for helping a newbie out.

    Hi,
    Welcome to the forum!
    Something like this will be more efficient:
    SELECT    COUNT (employee_id)               AS ECount
    ,       COUNT (DISTINCT department_id)     AS DCount
    FROM       employees
    WHERE       department_id IN (     SELECT     department_id
                        FROM      departments
                        WHERE      location_id = :userInput
    ;You should also try a join instead of the IN subquery.
    For efficiency, do only the things you need to do.
    For example, you don't need a count of employees in each department, so don't compute one. That means you won't need the in-line view, so don't have one.
    You don't need PL/SQL for this job, so don't use PL/SQL if you don't have to. (I realize this question was out of context, so you may have good reasons for doing this in PL/SQL.)
    Do all filtering as early as possible. Don't waste effort computing things that won't be used .
    A particular example of this is: Never use a HAVING clause when you can use a WHERE clause. What's the difference between a WHERE clause and a HAVING clause? The WHERE clause is applied before aggregate functions are computed, and the HAVING clause is applied after; there's no other difference. Therefore, if the HAVING clause isn't referencing an aggregate function, it could be done in a WHERE clause instead.

  • Variables:  What's the difference between

    I am reviewing and thinking about how I could have made a web
    application I created more efficient in the future. I was
    contemplating the use of variables so there would not have to be so
    many different results pages and queries. What is the different
    between the following variable types and perhaps a simple example
    of each if anyone has one:
    1. URL variable
    2. Cookie variable
    3. Session variable
    4. Environmental variable
    5. Form variable
    6. Server variable
    Thanks.

    fifthavenuegirl wrote:
    > What is the different between the following variable
    types and perhaps a simple
    > example of each if anyone has one:
    > 1. URL variable
    > 2. Cookie variable
    > 3. Session variable
    > 4. Environmental variable
    > 5. Form variable
    > 6. Server variable
    It would help if you were to say which server model you're
    using, but in
    simple terms, they each describe where the variable comes
    from.
    1. A URL variable is passed to a page through a query string
    at the end
    of the URL:
    http://www.example.com/somepage.php?name=David
    You access it in PHP as $_GET['name']
    2. A cookie variable comes from a stored cookie:
    $_COOKIE['name']
    3. A session variable is one that is available in all pages
    that are
    part of a session: $_SESSION['name']
    4. Environmental variables tell you information about the
    server your
    site is running on: $_ENV['variableName'] (not used very
    often)
    5. A form variable contains the contents of a form element
    submitted
    using the post method: $_POST['name']
    6. A server variable gathers information about the script or
    the server
    that the script is running on: $_SERVER['SCRIPT_NAME']
    contains the
    current script's path
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Why we use variables what  are the advantages of variables

    hi
      can u tell me why we use variables and where we use variables
    ashwin

    hi Ashwin!
    Variable are used for providing the parameters for a query at real time.  that means we can dynamicall specify some what exalty the query should display in the query  for example we can use a variable on the charectersitic like country so that we can decide the contents of the query to will be relavent to the countries we specified.
      Advantages of using the varibles in a query are
       1) we can build a single query which can be used by all. Ex:we can generate a report for all the customers seperatly by using a single query and just by changing the value in the variable at runtime
      2) if we use the processing type authorization for a variable. We can limit the user from accessing the information which he is not authorised to see in the report. This will also make us personalize the query based on the user who is accessing the report.
    Sap help on overview and usage and the types are given in the following link:
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56a7e09411d2acb90000e829fbfe/frameset.htm
    hope it helps.
    with regars
    Ashwin
    PS:
    (Rewarding points to the posted answers to your questions is a way of saying thanks in SDN forums)

  • Parsing SOAP Results into Variables

    Can someone assist me in figuring out what way I need to go
    to parse SOAP results into an array?
    I have setup the <MX:WEBService> correctly, created my
    resultEvent(event) handler and faultEvenet(event) handler as
    needed. Below is the web service:
    <mx:WebService
    id="srvGetTagHistory" wsdl="{SOAP_URL}"
    result="CreateTagHistory(event)" fault="faultEvenet(event)"
    useProxy="false">
    <mx:operation name="GetTagHistory" resultFormat="e4x">
    <mx:request>
    <RSWID>{vRSWID}</RSWID>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    This works perfectly. I can return the results of the
    webservice to a text area control, and the complete SOAP results
    are displayed.
    My problem is I cannot and have not figured out how to make
    the SOAP results into some type of arraycollection for using in,
    lets say, a dataGrid.
    Here is an example of a SOAP result for the above webservice:
    <NS1:GetTagHistoryResponse
    xmlns:NS1="urn:myresaleworldserviceIntf-myresaleworldserver"
    xmlns:NS2="urn:myresaleworldserviceIntf" xmlns:SOAP-ENV="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance"
    xmlns:SOAP-ENC="
    http://schemas.xmlsoap.org/soap/encoding/">
    <NS2:return href="#1"/>
    <SOAP-ENC:Array id="1">
    <item href="#2"/>
    <item href="#9"/>
    <item href="#16"/>
    <item href="#25"/>
    <item href="#29"/>
    </SOAP-ENC:Array>
    <NS2:rswTagHistory id="2">
    <OrderDate>2005-12-08T11:15:24.857-05:00</OrderDate>
    <TagType>CB Tags</TagType>
    <NS2:ColorDetail href="#3"/>
    </NS2:rswTagHistory>
    <SOAP-ENC:Array id="3">
    <item href="#4"/>
    <item href="#5"/>
    <item href="#6"/>
    <item href="#7"/>
    <item href="#8"/>
    </SOAP-ENC:Array>
    <NS2:rswTagColorDetail id="4">
    <TagColor>Lavender</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="5">
    <TagColor>Light Blue</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="6">
    <TagColor>Green</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="7">
    <TagColor>Pink</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="8">
    <TagColor>Yellow</TagColor>
    <Total>1</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagHistory id="9">
    <OrderDate>2005-12-08T11:18:44.233-05:00</OrderDate>
    <TagType>CB Tags</TagType>
    <NS2:ColorDetail href="#10"/>
    </NS2:rswTagHistory>
    <SOAP-ENC:Array id="10">
    <item href="#11"/>
    <item href="#12"/>
    <item href="#13"/>
    <item href="#14"/>
    <item href="#15"/>
    </SOAP-ENC:Array>
    <NS2:rswTagColorDetail id="11">
    <TagColor>Lavender</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="12">
    <TagColor>Light Blue</TagColor>
    <Total>3</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="13">
    <TagColor>Green</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="14">
    <TagColor>Pink</TagColor>
    <Total>3</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="15">
    <TagColor>Yellow</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagHistory id="16">
    <OrderDate>2006-08-07T13:56:22.513-05:00</OrderDate>
    <TagType>CB Tags</TagType>
    <NS2:ColorDetail href="#17"/>
    </NS2:rswTagHistory>
    <SOAP-ENC:Array id="17">
    <item href="#18"/>
    <item href="#19"/>
    <item href="#20"/>
    <item href="#21"/>
    <item href="#22"/>
    <item href="#23"/>
    <item href="#24"/>
    </SOAP-ENC:Array>
    <NS2:rswTagColorDetail id="18">
    <TagColor>Lavender</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="19">
    <TagColor>Light Blue</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="20">
    <TagColor>Green</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="21">
    <TagColor>Orange</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="22">
    <TagColor>Pink</TagColor>
    <Total>1</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="23">
    <TagColor>Red</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="24">
    <TagColor>Yellow</TagColor>
    <Total>1</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagHistory id="25">
    <OrderDate>2007-04-10T12:08:03.950-05:00</OrderDate>
    <TagType>CB Tags</TagType>
    <NS2:ColorDetail href="#26"/>
    </NS2:rswTagHistory>
    <SOAP-ENC:Array id="26">
    <item href="#27"/>
    <item href="#28"/>
    </SOAP-ENC:Array>
    <NS2:rswTagColorDetail id="27">
    <TagColor>Light Blue</TagColor>
    <Total>3</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="28">
    <TagColor>Green</TagColor>
    <Total>1</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagHistory id="29">
    <OrderDate>2007-12-19T12:52:30.883-05:00</OrderDate>
    <TagType>Thermal Tags</TagType>
    <NS2:ColorDetail href="#30"/>
    </NS2:rswTagHistory>
    <SOAP-ENC:Array id="30"/>
    </NS1:GetTagHistoryResponse>
    Any assistance to this issue would be greatly appreciated.

    If you have set resultFormat="e4x" than you can handle the
    result very easily.
    I guess you already find out that your result is in
    event.result.
    Your example is too hard to parse by human.
    You can read:
    http://livedocs.adobe.com/labs/flex3/html/help.html?content=13_Working_with_XML_01.html
    Especially: Traversing XML structures and Using XML
    namespaces
    I hope this will help

  • Regular expression result into variable??

    Im dealing with log files here...i use regular expression to detect the values...how can i save these values into variable, for example 25-07-2005 into "date"?
    this is how my output statement look like
    myOutput1.print(matcher1.group(1));
    matcher1.group is the way i use to get the value using regular expression

    thanx...actually i have already match it in groups and it works fine..the problem is im dealing with log files...what im trying to do is reformat back the log files collected...example.."8 Nov" change it to 8-11-2005
    When i match it into the group its actually just finding the pattern, not saving it into variable..if its save in the variable would be easier..
    how can i change "8 Nov" to 8-11-2005?? can anyone help me with a simple code???
    thanks

  • A simple query in My SQL what is the similer query for that in Oracle ???

    hello friends
    In My Sql if i have 1000 records in a table and i want to get the records from 400 to 550 then it is posible by giving the following query
    Select * from Table a , table b where condition "List 400,550" gives the records from 400 to 550
    what is the coresponding query for this in oracle database
    any one help me pls
    mail me to [email protected]

    Genericly, if you want records N through M from a SELECT statement, there's a wonderful article on asktom.oracle.com
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:127412348064
    Justin

  • What is the result of violating the thread safety rule of Swing?

    I needs to know what is the outcome of violating the thread safety rule of swing? memory leak? I have seen code violating the rule but still runs fine. Did anyone know?
    Thanks

    I had violated this rule and sometime it flies and sometimes it does a crash and burn. Most often it can result in a bug seen so rarely that it does not become a concern until the day of product roll-out. Mostly it can result in intermitent GUI anomallies and sometimes total app locks that are hard to intentionally reproduce. All paints and updates are done on the event queue and it is possible to invoke a thread on it saftly.
    I refer you to the tutorial at: http://java.sun.com/docs/books/tutorial/uiswing/mini/threads.html

  • What is the result of this query?

    select min(rowid) from table -- what does this give?
    Can anybody please answer?

    user6440749 wrote:
    select min(rowid) from table -- what does this give?
    Can anybody please answer?The min() function and the rowid pseudocolumn are both clearly documented in the SQL Reference manual.
    Please explain what it is about those documented explanations you don't understand and we'll be glad to help clear it up.

Maybe you are looking for