Select specific no. of records?

hi all!
i want to select specific no. of records from a table e.t.c KNA1.
means i have given the filed on screen to select how much records u want to select i.e user can give any no. and so that no of records should be picked.
how it is possible.

Hi,
I am assuming you have a selection screen S_KNA1.
Select-options : S_KNA1 for KNA1-KUNNR.
Select *
from KNA1 into table itab
where KUNNR in S_KNA1.
Hope This Help.
Vikas

Similar Messages

  • Selecting specific number of records

    Hellow
    How can we query certain number of records from table. For example if a table has thousands of records and i wish to query
    1. first 500 records
    2. Records between 500 and 1000 or between <anynumber> to <any number>
    3. Records less than <some number>
    I cannot perform the same operation from a primary key as it is not in serial.
    I tried to use ROWNUM, but i cannot use this when i want to select rows less than 100 or rows between 100 and 200...
    How can i accomplish this
    Regards
    Sunny

    1. first 500 records
    select *
    from ( YOUR_QUERY_GOES_HERE -- including the order by )
    where rownum <= 500Another way using analytical functions can be found in the documentation Top N Ranking
    2. Records between 500 and 1000 or between
    <anynumber> to <any number>
    select *
      from ( select a.*, rownum rnum
               from ( YOUR_QUERY_GOES_HERE -- including the order by ) a
              where rownum <= MAX_ROWS )
    where rnum >= MIN_ROWShttp://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:127412348064
    3. Records less than <some number>
    select *
    from my_table
    where my_column <   <some number>

  • Select specific number of rows

    i'm listing all data entries in a database.
    for that i want to select the 1st ten entires, then the next ten and so on ordered
    by date_column.
    how can i do that? is it possible with rownum?
    in mysql/php i did it with limit
    $query = "select * from article where parent_id=0 order by date desc, time desc limit $select, 10";
    please email me.
    thanks for help
    chris

    but what about rownum if i want the
    records from 10-20?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Chen Zhao ([email protected]):
    If you are using Oracle 8i, you can use ROWNUM to specify the specific number of records. You can see the ROWNUM by querying:
    SELECT *
    FROM (SELECT column_name FROM table_name ORDER BY column_name)
    WHERE ROWNUM<10
    CHEN<HR></BLOCKQUOTE>
    null

  • Select * v/s select specific in oracle

    Dear Friends please proivde your valuable opinions:
    how does oracle behaves internally in case when all records are selected (select * from X) and in case when few records ( select A, B from X) selected.
    I had a discussion with my DBA DBA says even if you select specific column oracle internally selects the whole row (all columns) and then selects specific columns out of it.
    Being an application developer I believe that specific column selection is fast and oracle should not be selecting all columns internally.
    Arpit Bansal

    Aside from the fact that selecting a particular column list is a heck of a lot safer, since it doesn't break when new columns are added to a table, selecting a subset of the columns may be more efficient, particularly if it reduces the amount of data that needs to be sorted or hashed or if it allows all the data to be fetched from an index. If Oracle has to read data from the table itself, it will generally have to read the entire row into the buffer cache (overflow segments in an IOT being the biggest exception I can think of).
    Justin
    Added clarification about queries that can be satisfied exclusively via indexes.
    Message was edited by:
    Justin Cave

  • Select AR_LOOKUPS retrieved no record while in pl/sql plus record exist

    I ran "select * from ar_lookups" no record retrieved while when I run the same script in TOAD or pl/sql plus there are records retrieve.

    Sorry for the very late response, but the problem is probably related to AR_LOOKUPS being an eBusiness Suite language specific view, which means the conditions in the view include:
    LV.LANGUAGE = userenv('LANG')SQL Developer defaults the NLS settings based on the Regional Settings (assuming you are on Windows) and not the Oracle registry entries (what is typically used by other tools), although you can change this by explicitly setting your NLS preferences via Tools > Preferences > Database > NLS Parameters.
    If your only installed transaction for the eBusiness Suite is US (for example), but your SQL Developer NLS settings are such that userenv('LANG') doesn't return US, you will not get any records returned by the AR_LOOKUPS view (or any of the other many language specific views). To get SQL Developer to match the NLS behaviour of other tools, set your NLS parameters to match what you have set in the Oracle registry entries.
    theFurryOne

  • How to select specific rows in rtf template for complex calculation

    Hi,
    I want custom calculation in my rtf template and for this i need to select specific cell's value OR specific row's value. Any one please suggest how can I get this. Below is the example i have plotted using excel. My target is to get field 8 and 9 using sum and minus. We can calculate column over column, is there any way to calculate row over row? If I use variables, then i have to create so many variables because I have more columns and rows to calculate (here i posted one sample table). Any one please help me how can I get expected result other than using variables! If "Using variables" is the only way then also give your valuable opinions.
    Row No
    Curr Qtr
    PQtr1
    PQtr2
    3
    B3
    C3
    D3
    4
    B4
    C4
    D4
    5
    B5
    C5
    D5
    6
    B6
    C6
    D6
    7
    B7
    C7
    D7
    8
    B8=SUM(B4:B7)
    C8=SUM(C4:C7)
    D8=SUM(D4:D7)
    9
    B9=B8-B5
    C9=C8-C5
    D9=D8-D5
    Thanks.

    Hi AlexAnd,
    Thanks for the reply, I got 0 using both codes. This is a dummy table and I plotted 3,4 to give an idea of row number (as like as excel). Rows are individual data sets combining different measures and dimensions with different values.
    Account
    Curr_Qtr
    PQtr1
    PQtr2
    Deposit
    10
    15
    20
    Loan
    15
    20
    25
    Earning
    20
    25
    30
    Assets
    25
    30
    35
    Total
    =SUM(15,20)
    =SUM(20,25)
    =SUM(25,30)
    Expense
    =SUM(15,20)-25
    =SUM(20,25-30
    =SUM(15,20)-25
    Is there any way to identify the range or individual cell's value? Using variables I have to create lots of variables for each cells, I want to avoid that and want to use rows in calculation! Is that possible, Pls share your valuable opinions!
    Thanks.

  • Why can't I select or update the Record using the PreparedStatement?

    the DB is oracle9i,here is the test table
    test
    id number;
    name char(10);
    intro char(10);
    I have insert a record in the table.
    Now I will select or update the record by using the PreparedStatement here is my code:
    sqlStr = "update test set intro = ? where name =?";
    PreparedStatement stmt = conn.prepareStatement(sqlStr);
    stmt.setString(1,"my name is irixwang");
    stmt.setString(2,"irixwang");
    int is = stmt.executeUpdate();
    if (is >=1 )
    System.out.println("ok");
    It will not work ,but where I change the update condiction as followed:
    sqlStr = "update test set intro = ? where id =?";
    PreparedStatement stmt = conn.prepareStatement(sqlStr);
    stmt.setString(1,"my name is irixwang");
    stmt.setInt(2,100);
    int is = stmt.executeUpdate();
    It works well,why?
    please help me!thk!!!!

    I doubt it works "well" in either case since you are inserting a string that is longer than 10 characters into a field that only holds 10 characters. But to your question....
    A char data type holds a fixed number of characters - in your case 10.
    Because it holds 10 characters it will never hold 9, regardless of what you think is in the field it will always have 10 characters in it. The value you are using for query for name is 9 characters. Since 9 characters, regardless of content, will never be equal to 10 characters there is no way that it will update.
    So your choice is to either use a varchar, which holds a variable number of characters, or to always use 10 characters for your query (pad it with spaces.)

  • Parameter in select to returns all records.

    Post Author: ComputerMike
    CA Forum: Crystal Reports
    Hi,
    I have a "project" parameter I use in my select formula to return records based the project field.  I would like to pass a value like "All" or "*" and have all reords returned, to see the records for all the projects.  If I pass in "3" I would just get records for project 3.  "All" would give me all the projects.
    Thanks,
    Mike

    Post Author: GraemeG
    CA Forum: Crystal Reports
    Modify your selection formula to something like:
    (if {?project} <> "ALL" then   {table.project} = {?project}else   1 = 1)
    You have to specify an 'else' and the above is a cheat that makes sure everything is selected if 'ALL'  is entered. A suggestion - make 'ALL' your parameter default.

  • How can i select more than one record in a LOV

    I want to select more than one record in a LOV and put them together before to display them in an item.

    This is not possible with a default LOV, so you'll need to create your own. There are a number of ways to select multiple records:
    a) you can use a tree and set Multi-Selection to Yes
    2) you can use a normal block with a checkbox on each row for the user to select records
    three) with the [SYSTEM.MOUSE_BUTTON_MODIFIERS|http://www.oracle.com/webapps/online-help/forms/10g/topics/designing_forms/mouse/at0604.html?tp=true] variable you can allow users to ctrl+click to select many records in a block. set the background colour to indicate a record has been selected
    iv) there is a pjc in the [demo code section|http://download.oracle.com/otndocs/demos/Forms_Demos_10gr2.zip] which lets you select many rows in a poplist

  • Variable selection criteria in the record selection

    Variable selection criteria in the record selection with Crystal Report with SQL 2005 Server tables.
    In the record selection I would like to use the value of the field u201CsSQL1u201D as part of the selection criteria instead the field name {tblReportAccessAutority.sSQL1}
    The value of the field {tblReportAccessAutority.sSQL1} is {tblSalesReporting.sJEDivisionCode} = 'I'
    I tried with formulas, SQL expressions, but nothing works.
    Record selection of the report:
    {tblReportAccessAutority.sUserID} = CurrentCEUserName
    and {tblSalesReporting.sLegalEntity} = {?Legal Entity}
    and {tblSalesReporting.sJEPeriod} = {?PARAM_PERIOD}
    and {tblSalesReporting.sIG3rd} =  {?PARAM_IG3RD}
    and {tblReportAccessAutority.sSQL1}                           <---this is the problem line
    The field {tblReportAccessAutority.sSQL1} is not converted in the value:
    {tblSalesReporting.sJEDivisionCode} = 'I'     
    The tables tblSalesReporting and tblReportAccessAutority are joined in this report.
    Many thanks for your help.
    Roger

    How is the syntax for the selection criteria in the record selection?
    {tblReportAccessAutority.sUserID} = 'ch1scro2'
    and {tblSalesReporting.sLegalEntity} = {?Legal Entity}
    and {tblSalesReporting.sJEPeriod} = {?PARAM_PERIOD}
    and {tblSalesReporting.sIG3rd} = {?PARAM_IG3RD}
    and SELECT {@sSQL_Condition} ???????? or
    and  {@sSQL_Condition} ??????? or how?
    The expression fir the formula {@sSQL_Condition} is:
    TOTEXT({tblReportAccessAutority.sSQL1})
    The field definition for {tblReportAccessAutority.sSQL1} is nvarchar(50).
    Thanks Roger

  • I want to delete all music on my i-Phone and reload what I want...have tried to do it manually on i-Tunes and by just selecting specific songs, but nothing comes off my phone.

    I want to delete all music on my i-Phone and reload what I want...have tried to do it manually on i-Tunes and by just selecting specific songs, but nothing comes off my phone.

    You might want a more Mac-centric version of that post which is directed more at Windows users.
    iTunes will only give you the option to copy your iTunes Store purchases directly from an iPod to the computer, you'll find details in this article: Copying iTunes Store purchases from your iPod or iPhone to a computer
    For everything else (music from CDs, other downloads and including iTunes purchased songs and in some cases, videos and games) there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod. I use Senuti but have a look at the web pages and documentation for the others too. You can read reviews and comparisons of some of them here (you'll find that they have varying degrees of functionality and some will transfer movies, videos, photos and games as well):
    Wired News - Rescue Your Stranded Tunes
    Comparison of iPod managers
    A selection of iPod to iTunes utilities:
    Senuti Mac Only (iPod Touch & iPhone compatible)
    expod Mac Only (iPod Touch & iPhone compatible)
    PodView Mac Only
    PodWorks Mac Only
    TuneAid Mac only (iPhone and iPod Touch compatible)
    YamiPod Mac & Windows
    iPod Music Liberator Mac & Windows (iPhone and iPod Touch compatible)
    iPodRip Mac & Windows (iPhone and iPod Touch compatible)
    iPod Music Liberator Mac & Windows (iPhone and iPod Touch compatible)
    iGadget Mac & Windows (iPhone and iPod Touch compatible)
    Floola Mac & Windows
    Music Rescue Mac & Windows (iPhone and iPod Touch compatible)
    iRepo Mac & Windows (iPhone and iPod Touch compatible)
    iPod Access Mac & Windows (iPhone and iPod Touch compatible)
    TouchCopy Mac & Windows (iPhone and iPod Touch compatible)
    There's also a manual method of copying songs from your iPod to a Mac or PC. The procedure is a bit involved and won't recover playlists but if you're interested it's available on page 2 at this link: Copying Content from your iPod to your Computer - The Definitive Guide

  • How to select specific layers as a book mark

    Im making a warehouse blueprint type document where i want to have lighting, emergency exits etc, the bookmark will select specific layers.i follwed this tutorial and got stuck.  http://help.adobe.com/en_US/acrobat/X/pro/using/WS58a04a822e3e50102bd615109794195ff-7c5b.w .html.  where is said Select the Link tool !http://help.adobe.com/en_US/acrobat/X/pro/using/images/AX_AddLink_Md_N.png!, and drag in the document pane to create a link.  i can't see the document pane?  please help

    so its this that im having a problem with 'Associate layer visibility with a link destination', i have a second book mark its got for its action set layer visbauilty, i just need to add the currently selected layers to that book mark please help

  • Is it possible to select specific properties of multiple layers at once?

    I know that you can alter, opacity for example, of multiple layers at the same time by selecting the opacity property of each layer. But what if there are so many layers that you want to select a single property of many layers at once?
    For example, I want to edit the value of the "mask expansion" property of a lot of layers, but don't want to go through and select "mask expansion" on every single layer. Surely there must be a way to select specific properties across multiple layers?

    No, unfortunately there isn't. Such stuff is based on the property control actually being visible and being equally visibly selected. Unless you linked it with expressions, it won't sync without the properties being revealed and selected.
    Mylenium

  • POSSIBLE TO SELECT SPECIFIC APPLICATIONS WITH MIGRATION ASSISTANT?

    Is it possible to select specific applications to transfer from a Powerbook to an iMac? So far I've only found the given option, which imports the entire folder.
    Thanks for helping.

    http://discussions.apple.com/thread.jspa?threadID=1876275&tstart=0
    That question was answered not more than an hour ago...

  • Select specific folder while install DP for SCCM 2012 R2

    Hi All,
    I have two Question:
    1- Is there any option to select specific folder like "C:\Windows\DP Packages\" to include all folders for Distribution Point (SCCMContentLib.....) -- Can we use Hidden folder?
    2- Can we Limit Distribution point to Use only specific storage Like 50 GB from disk?
    Thanks.

    1) Out of the box No. The contentlibrary will be created in the root of the drive by default
    2) When creating the DP you can configure "Drive Space reserve" available before another drive is selected.
    Kent Agerlund | My blogs: blog.coretech.dk and
    SCUG.DK | Twitter: @Agerlund | Linkedin:
    Kent Agerlund | Author:
    Mastering System Center 2012 R2 The Fundamentals

Maybe you are looking for