I have a table tab1 with record(1,2,3,4,5,6,7,8,9). i want to create a proc

i have a table tab1 with record(1,2,3,4,5,6,7,8,9). i want to create a procedure, when we pass the parameter in procedure then that record come on top rest record below of that.
thanks,

Is the block based on a table ?
Francois

Similar Messages

  • Should I have a table column with total price?

    Hello,
    I have the following SQL Scheme:
    create table dbo.Baskets (
    Id int not null primary key clustered (Id),
    Name nvarchar (80) not null
    create table dbo.Products (
    Id int not null primary key clustered (Id),
    BasketId int not null,
    Price decimal (10, 2) not null,
    Name nvarchar (80) not null
    So one basket can have many products.
    I often need to find baskets in a specific price range.
    I know the basket price is the sum of its products prices.
    **QUESTIONS**
    1. Should I add a column to Baskets with TotalPrice?
    2. Would this improve query performance a lot?
    3. Can this be done automatically when Products are updated?
    4. Should I index some column here?
    Thank You,
    Miguel

    1.It depends on the queries run against the table 
    2.May or may not, depends how would like to calculate it or you get already calculated value for the client or whatever
    3. Yes, but then you will have to write a trigger at least
    4. Depends on the queries and columns  that participate in WHERE clause
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Every time I update or repair in the control panel it comes up with a error message like, this file does not have a program associated with it for performing this action, please install a program if it is installed create an association to the default pro

    EVERYTIME I UPDATE SOFTWARE OR GO INTO THE CONTROL PANEL TO ITUNES TO REPAIR OR CHANGE IT GIVES ME AN ERROR MESSAGE
    THIS FILE DOES NOT HAVE A PROGRAM ASSOCIATED WITH IT FOR PERFORMING THIS ACTION. PLEASE INSTALL A PROGRAM, IF IT IS INSTALLED CREATE AN ASSOCIATION TO THE DEFAULT PROGRAMS CONTROL PANEL

    STOP SHOUTING!  Or at the very least, get the CAPS lock key fixed.
    Remove iTunes.
    Download and install the current version of iTunes from http://www.apple.com/itunes/download

  • HT2204 if i already have an apple id with my itunes and i just bought a new iphone do i want to use the same apple id for icloud as my itunes?

    If I already have an apple id for my itunes account and I purchased an iphone should i use the same apple id for the iclouid feature or set up a different one?

    Personally, I'd keep it simple and keep the same one.

  • Table Control with default values for a Column

    Hi,
      I have a table Control with  fields  kschl    kbetr    konwa    mark     
    i have created a range for KSCHL
    now i need to pass this to the table column
    Kindly suggest how can i handle this?
    BEGIN OF y_condition,
      kschl       TYPE kscha,
      kbetr       TYPE kbetr_kond,
      konwa       TYPE konwa,
      mark        TYPE char1,
    END OF y_condition,
    t_cost TYPE STANDARD TABLE OF y_condition,
    MODULE mo_tc_cost_init OUTPUT.
      IF  w_tc_cost_c IS INITIAL.
        REFRESH CONTROL c_tc_cost FROM SCREEN c_scr2000.
        REFRESH t_cost.
        MOVE c_select TO w_tc_cost_c.
        FREE r_kschl.
        MOVE: c_i    TO r_kschl-sign,
              c_eq   TO r_kschl-option,
              c_zhb1 TO r_kschl-low.
        APPEND r_kschl.
        MOVE: c_i    TO r_kschl-sign,
              c_eq   TO r_kschl-option,
              c_zhb2 TO r_kschl-low.
        APPEND r_kschl.
        MOVE: c_i    TO r_kschl-sign,
              c_eq   TO r_kschl-option,
              c_zhb3 TO r_kschl-low.
        APPEND r_kschl.
      ENDIF.

    Can you clarify please?... you say have a table control containing the following columns:
    kschl TYPE kscha,
    kbetr TYPE kbetr_kond,
    konwa TYPE konwa,
    mark TYPE char1
    so where do you expect the range table "r_kschl" to appear? ... did you want a second table control on the screen?
    Jonathan

  • How to export iPhoto Album in iMAC and have similar folder structure(with Timestamps) which can be viewed in finder

    How to export iPhoto Album in iMAC and have similar folder structure(with Timestamps) which can be viewed in finder
    In simple terms, I wanted to view the photos in Windows system, similar strcture of iPhotos

    If you want to copy all of your photos to a Windows machine and have them in folders representing the iPhoto Events the were in quickly and easily just do the following:
    1  - open the library with the Finder as shown in this screenshot:
    2 - COPY the Originals/Masters folder to the Desktop.
    3 - copy the Originals/Masters folder to the Windows machine.
    This will give you all of your original image file in their Event folder on the Windows machine.
    NOTE:  With iPhoto 8 or newer the Event folders in the Masters folder will be titled by date (EXIF) if imported from a camera.  If imported from a folder the event folder will have the same title as the source folder.  If imported singularly or in a group without a folder the title will be a date, either the EXIF date or import date.
    With iPhoto 7 (08) and earlier the Event folders in the Originals folder will have the same title as the Event has in the library.
    This method would be quicker but not provide the additional metadata you might have added in iPhoto like keywords, titles, descriptions that exporting out of iPhoto with Format=JPEG and the checkboxes selected to include keywords, titles, places, etc, checked.
    OT

  • I have a iPhone 5c with cracked screen how long is the warranty

    I Have an iPhone 5c with a broken screen. It is under a year old so wanted to mnow if I can get it repaired for free

    A broken screen is not covered by the warranty, sorry. You'll have to pay for the repair:
    Screen repair service pricing
    Repair and replacement costs depend on your iPhone model and your AppleCare product coverage. Apple will run a diagnostic test to determine whether your iPhone has experienced additional damage. If it has, or if it needs other repairs, you may need to pay an out-of-warranty service fee. Accidental damage isn't covered under the Apple One Year Limited Warranty.
    Model
    Screen repair cost
    iPhone 6
    $109
    iPhone 6 Plus, iPhone 5s, iPhone 5c, iPhone 5
    $129
    Plus a $6.95 shipping fee, if required. Fees are in USD and exclude local tax. Pricing is for service through Apple. The final service fee we charge will be determined during testing. Pricing and terms vary for service through an Apple Authorized Service Provider.
    copied from Apple - Support - Service Answer Center

  • I want to create a Paid Books Account however, I already have a iTunes store account for creating Apps with complete contracts, tax,

    I have created some books using the iBook author and in order to distribute content on the iBookstore I have been told electronically that I need a new Apple ID and password that is different to iTunes store account which I have already activated and completed contracts, tax information and bank information valid until 2013?
    I want to create a Paid Books Account using the same email address, tax information and bank information. This has been most frustrating, as I cannot get passed the sign in section and there is no contact person I can speak to. I was of the understanding the iTunes connect account and the Developer programs which I paid good money for is all what I needed to be paid for selling iBooks on the iBookstore???
    I only have one email address and wish to also use it for the Paid Books Account. I have books ready to be exported and published.
    I am also having trouble locating and downloading iTunes Producer. I understand I need to have the Paid Books Account active to access the iTunes Producer program. Please help.

    Did you use an existing Apple ID or create a new one just for paid books sales/distribution?

  • How to get Apple ID and password that is different to iTunes store account which I have already activated and completed contracts, tax information and bank information I want to create a Paid Books Account use apple ID

    I was given this address from the Apple customer support team.
    I have an active existing iTunes store account and use the same Apple ID for signing into my iTunes Connect Account that distributes Apps.
    I have created some books using the iBook author and in order to distribute content on the iBookstore I have been told electronically that I need a new Apple ID and password that is different to iTunes store account which I have already activated and completed contracts, tax information and bank information valid until 2013?
    I want to create a Paid Books Account using the same email address, tax information and bank information. This has been most frustrating, as I cannot get passed the sign in section and there is no contact person I can speak to. I was of the understanding the iTunes connect account and the Developer programs which I paid good money for is all what I needed to be paid for selling iBooks on the iBookstore???
    I only have one email address and wish to also use it for the Paid Books Account. I have books ready to be exported and published.
    I am also having trouble locating and downloading iTunes Producer. I understand I need to have the Paid Books Account active to access the iTunes Producer program. Please help.
    See additional information below:
    What device did you use to connect to the store?  Mac computer
    Which operating system is installed?  Mac OS X v10.7.x
    What version of iTunes is installed on your computer?  iTunes 10.6
    Choose the iTunes Store or App Store for your country:  Other
    Please select your country:  Australia

    Hi Lrwill,
    If the apps that are on your son's iPad were purchased under his Dad's Apple ID, then signing your Apple ID onto the iPad will not help you with updating those apps.
    Also, if the iPad was sync'd with his Dad's iTunes library, then hooking it up to your computer/iTunes library, will require you to reset the iPad, and everything that was loaded under the other Library and Apple ID will be wiped out.
    Can you provide a little more info about what was set up under which Apple ID and what iTunes library the iPad was sync'd with?
    Cheers,
    GB

  • How to rerieve records from the table starting with character 'D'

    Hi Folks,
    How to get the records from the table starting with character 'D'.
    Select Max (fld1) fron tab1 into tab1-fld1 where fld 2 = l_fld2 and starting character of fld(1) is 'D'.
    last record in the table starting with character 'D'
    How can i do that??
    Pl explain.
    Thanks,
    Matt

    Hi,
    Select Max (fld1) fron tab1 into tab1-fld1 where fld 2 = l_fld2 and starting character of fld(1) is 'D'.
    Select MAX (fld1)
       From  tab1
    into table itab
    where fld 2 = l_fld2
       and fld1 like 'D%'.

  • SQLJ calling PL/SQL with records and tables as parameters

    Has anyone used sqlj to to call procedures with records and
    tables as IN, OUT, or INOUT as parameters? If so how do you
    assign values to the IN parameter in the record/tables, and get
    values out of the record/table when it is passed back? Might
    anyone have any syntax?
    null

    One thing I forgot to mention: If you're an 8i client, then in
    8.1.6 you'll be able to use JPublisher to solve this problem,
    since it'll generate these wrappers for you.
    Pierre
    Oracle Product Development Team wrote:
    : Hi,
    : The key issue is that no part of Oracle code except PL/SQL is
    : aware of the PL/SQL Record types and PL/SQL "index-by" table
    : types.
    : So the only way to call a PL/SQL procedure with args of a
    RECORD
    : or "index-by" table types is from another PL/SQL routine.
    : In most cases, it's possible to work-around this by wrappering
    : your PL/SQL method with another which doesn't have this issue.
    : For example, if you're trying to call procedure proc01 in:
    : package pack01 is
    : type rec01 is record(n1 number, d1 date);
    : procedure proc01 (r rec01);
    : end;
    : you can create a wrapper method:
    : package pack01_wrapper is
    : procedure proc01_wrapper (n1 number, d1 date);
    : end;
    : package body pack01_wrapper is
    : procedure proc01_wrapper (n1 number, d1 date) is
    : r pack01.rec01;
    : begin
    : r.n1 := n1;
    : r.d1 := d1;
    : pack01.proc01;
    : end;
    : end;
    : If you're a 7.3 client, that's about all you can do. The Fix
    was
    : introduced in 8.0, where new structured types (ADT's) and new
    : table types (VARRAY's and Nested tables) were introduced. So
    if
    : you're an 8.0 client, your 'wrapper' package could use an ADT
    : which has the same attributes as the record, rather than
    : 'exploding' the record into its individual components as I
    showed
    : above.
    : Hope this helps!
    : Pierre
    : Thomas Richardson (guest) wrote:
    : : Has anyone used sqlj to to call procedures with records and
    : : tables as IN, OUT, or INOUT as parameters? If so how do you
    : : assign values to the IN parameter in the record/tables, and
    get
    : : values out of the record/table when it is passed back? Might
    : : anyone have any syntax?
    : Oracle Technology Network
    : http://technet.oracle.com
    Oracle Technology Network
    http://technet.oracle.com
    null

  • SQLite - populating a list with records from a table

    I'm fairly new to FB and AIR but have run myself through some tutorials regarding event handling and code structure. I have made some progress with an app for my Android 'phone which uses and SQLite database.
    I've created the DB and stored it under assets.
    I can open and read from it and store the records from a table in the DB to an array and then put the records into an arraycollection.
    via the list dataprovider I then can assign the records to the list and they show up at runtime in the list.
    I then presumed that the list changehandler event would allow me to assign the selecteditem in the list to a label control. Unfortunately the label control just gets 'object object' displayed when a list item is selected - almost a sif the list were empty.
    I cannot work out how to paste the code into this forum message but any advice on either of these problems would be greatly appreciated.
    Thanks

    I'm fairly new to FB and AIR but have run myself through some tutorials regarding event handling and code structure. I have made some progress with an app for my Android 'phone which uses and SQLite database.
    I've created the DB and stored it under assets.
    I can open and read from it and store the records from a table in the DB to an array and then put the records into an arraycollection.
    via the list dataprovider I then can assign the records to the list and they show up at runtime in the list.
    I then presumed that the list changehandler event would allow me to assign the selecteditem in the list to a label control. Unfortunately the label control just gets 'object object' displayed when a list item is selected - almost a sif the list were empty.
    I cannot work out how to paste the code into this forum message but any advice on either of these problems would be greatly appreciated.
    Thanks

  • I have a table with info and would like to select an item from that table

    Hi
    I have a table with info (course info that I searched for) and would like to select an item from that table to use for further use in my application.
    It must work more or less like the tree structure where I can use an On Action select.
    In other words; let say I am looking for all courses with "Advisor" it its descriptin / name, I want to click on one of the names and use it lets say to book people on.
    Could some please assist me with this.
    Regards
    Debbie

    Hi
    The datasource for my table is the node searchcatalog.  Under this node there is an attribute calles description where the items found are displayed.
    I changed my code as follow:
    data: ls_table type wd_This->Elements_searchcatalog,
          lr_element type ref to if_wd_context_element.
      DATA lo_nd_searchcatalog TYPE REF TO if_wd_context_node.
      DATA lo_el_searchcatalog TYPE REF TO if_wd_context_element.
      DATA ls_searchcatalog TYPE wd_this->element_searchcatalog.
    navigate from <CONTEXT> to <SEARCHCATALOG> via lead selection
      lo_nd_searchcatalog = wd_context->get_child_node( name = wd_this->wdctx_searchcatalog ).
    @TODO handle not set lead selection
      IF lo_nd_searchcatalog IS INITIAL.
      ENDIF.
    get element via lead selection
      lo_el_searchcatalog = lo_nd_searchcatalog->get_element(  ).
    @TODO handle not set lead selection
      IF lo_el_searchcatalog IS INITIAL.
      ENDIF.
    get all declared attributes
      lo_el_searchcatalog->get_static_attributes(
        IMPORTING
          static_attributes = ls_searchcatalog ).
    lo_nd_searchcatalog->get_lead_selection->( exporting index = wdevent->index importing
    element = lr_element ).
    lr_element->get_static_attributes->( importing static_attributes = ls_table ).
    wd_context->set_attribute( exporting name = 'SELECTED' value = ls_table-description ).
    When I try to activate it errors with: List elements that take up more than one line is not allowed.  This error at the sentence: lo_el_searchcatalog->get_static_attributes(
    If you cannot assist me further I will understand.  Thank you.

  • How to create a record for table PLAF with order type 'NB'.

    How to create a record for table PLAF with order type 'NB'(standard purchase order).
    who can tell me the T-code or some usefull information?
    Thanks.

    Hi
    This will be updated automatically when generate planned orders thru MRP. (MD02)
    regards
    Srinivas

  • How to have a table with table headers eventhough table is into Scrollpane?

    How to have a table with table headers eventhough the table is placed in the scrollpane?
    This is because when i place my jtable into the scrollpane the table headers aren't showed.
    I have read that i need to override:
    configureEnclosingScrollPane() from jtable.....and with:
    JViewport viewport = scrollPane.getViewport();
    viewport.getView()
    i think that i can reach it....but i don't know how to integrate it...to reach to have my jtable into a jscrollpane wiht the same headers of my jtable......
    Could somebody help me please?......
    Thanks,
    Mary

    How to have a table with table headers eventhough the table is placed in the scrollpane?
    This is because when i place my jtable into the scrollpane the table headers aren't showed.
    I have read that i need to override:
    configureEnclosingScrollPane() from jtable.....and with:
    JViewport viewport = scrollPane.getViewport();
    viewport.getView()
    i think that i can reach it....but i don't know how to integrate it...to reach to have my jtable into a jscrollpane wiht the same headers of my jtable......
    Could somebody help me please?......
    Thanks,
    Mary

Maybe you are looking for