Help-how can i see the sequence in the table?

Hi, i created sequence for the table. but how can i view the sequence as a column in the table? like the sequence started with 1 and increment by 1. how can i make it available as a column in the table? thanks a lot for anyone's prompt reply. much appreciated.

eg.
Create table:
create table t1 (
id number(10),
col1 varchar(2)
Create sequence:
CREATE SEQUENCE "PEMARTEN"."T1_ID" NOCYCLE NOORDER CACHE 20 NOMAXVALUE MINVALUE 1 INCREMENT BY 1 START WITH 1
You can do 2 things:
Use the sequence in your insert query:
eg.
insert into t1 (id, col1) values (t1_id.nextval, 'example');
OR
Create a before insert trigger (prefered):
CREATE OR REPLACE TRIGGER "PEMARTEN"."BI_T1" BEFORE INSERT ON "PEMARTEN"."T1"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
DECLARE
new_id number;
BEGIN
SELECT t1_id.nextval
INTO new_id
FROM dual;
:new.id := new_id;
END;
Now you can just insert data:
insert into t1 (col1) values ('example');
sequence.nextval increments the sequence and returns the next value
sequence.currval returns the current value of a sequence
I hope that helps.
Kind regards,
Pieter

Similar Messages

  • My daughter has an iPod touch and is emailing a much older boy via text free app she downloaded. How can I see the conversations? Please help and thank you

    Please help me...My 12year old daughter has been talking to a older teenager through the text free app. How can I see the conversations? Also, there is a photo vault that is locked. What is that? Please someone help me. I don't know what else to do. I paid and downloaded a program that is supposed to tell you everything that's on the ipod but that was a joke. Thanks for your help.

    As long as you can't get a hold of the device, you can't do anything more than talking to your daughter about it.
    Erasing the device could also be an option to keep her from using apps you don't want her to have on her device.
    Try talking first

  • How can I see the information about a file used in a sequence?

    How can I see the information about a file used in a sequence?

    You can use pretty much any two or multiple button mouse on a Mac, right out of the box.
    I use this one: http://www.apple.com/mightymouse/

  • How can i see the date of the pictures i took? help!

    how can i see the date of the pictures i took? help!

    Import them to your computer (see http://support.apple.com/kb/HT4083) and the date and other exif data will be available.

  • How can I see the tracklist in the Podcast app (like I can in the Music app in ios6)?

    When playing a podcast in the Music app in ios6, I can tap the screen and see the track list.  How can I see the track list in the Podcast app in ios7?

    Dakota
    The table MARV holds the current and previous values for the purchasing period and who changed them.  The table is usually set for logging of changes and you may be able to find the history you want depending on how your database is setup.  I hope this helps.
    Regards
    H

  • How can I see the stored files in cache?

    How can I see the stored files in cache? I need them!
    Thanks for helping me.

    The History menu lets you revisit the page where you can drag any page element from it.
    How would you sort through thousands (tens of thousands) of files found in a cache?

  • How can i see the posts that i answered?

    How can i see the posts that i answered?
    Actually i some others post for a VLAN.. now i need that post ... but i'm unable to find it...
    Can someone please help me in this ?
    Regards,
    Chandu

    I probably do not fully understand your question. Based on what I think I understand I offer these suggestions:
    - if you click on your profile, or using the account link on a forum page select profile, then at the bottom of the information of your profile is a list of the responses that you have made. But it displays a limited number of responses.
    - if you use the search feature of the community you might find it by searching on your name, or better to search for some term that was used in the response.
    HTH
    Rick

  • How can I see the relationship of tables in Microsoft SQL Server?

    How can I see the relationships of the tables? Exactly like what we see in Access. In Access if we select Database tool and then relationships, we can see how the tables are linked to each other. How can I find this option in SQL Server Management Studio?
    Thanks,
    GGGGGNNNNN
    GGGGGNNNNN

    Thanks,
    I could verify what you explained here. how can I overcome this message and resolve it when my database owner is not there:
    Message while starting with database diagrams of a attached/restored database
    If you have just attached/restored a database from another SQL Server instance. While accessing its database diagrams folder, you may get the following message
    It is an informational message and would prevent you from working on database diagrams. The message says that your database has no valid owner currently. Reason for this error is that database owner on a previous SQL Server instance does not exist here.
    To overcome this error just add the valid database owner through T-SQL or SSMS. Also verify the compatibility level of your database is correct for your SQL Server instance.
    I appreciate your help.
    GGGGGNNNNN
    GGGGGNNNNN

  • In ST03 , how can i see the Query name, user id,how many times executed the

    HI Experts,
    In ST03 , how can i see the Query name, user id,how many times executed the query.
    these details how do i get from the above transaction.
    EX:-if there is one report name X,I want to know how many users had executed X report today,weekly,monthly.
    ex:-query userid total number of execution
    sales order 0000555 5 times
    custmer 05855 2 times
    fast reply will be appreciated,

    Hi,
    Look here:
    http://help.sap.com/saphelp_nw04/helpdata/en/3b/54df4204892a78e10000000a155106/frameset.htm
    Also check these:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/b8be3befaefc75e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/25/ece73a39e74d27e10000000a114084/frameset.htm
    Hope this helps..
    Bye
    Dinesh

  • In ST03 , how can i see the Query name, user id,how many times .

    HI Experts,
    In ST03 , how can i see the Query name, user id,how many times executed the query.
    these details how do i get from the above transaction.
    Points will be awarded.
    BR
    sivs

    Hi Siva,
    Reporting statistics data is only written to the database table if BW statistics have been manually activated for the corresponding InfoProvider first. If this has not been done, it is therefore not possible to display any reporting statistics in transaction ST03.
    Therefore activate the reporting statistics for all relevant InfoProviders. To do this, set the OLAP flag in the BW Administrator Workbench (transaction RSA1) in the area Tools ® BW Statistics for InfoProvider.
                    Check here...........
    http://help.sap.com/saphelp_nw04/helpdata/en/ca/86df4254d81e1fe10000000a155106/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918a17e663cc
    Hope this will help you shiva.........
    Regrads,
    Vijay

  • How can I see the last location of a now dead ipod touch 4G that had find my iphone turned on?

    How can I see the last location of a now dead ipod touch 4G that had find my iphone turned on? I can see my macbook but I cant see the last location of my ipod touch. I lost it a few weeks ago and figured it would show up. But it has not and I need it again for my job. Please help.

    There is nothing you can do now. There are apps available from the app store that would give you that information if installed before it was lost/stolen.

  • How can I see the selected tags in the tag bar clearly

    How can I see the selected tags in the tag bar clearly (they used to be in black, now they do not change color; a highlight or Bold would help)

    The History menu lets you revisit the page where you can drag any page element from it.
    How would you sort through thousands (tens of thousands) of files found in a cache?

  • How can i see the code of SAP Exit for SAP Defined Variables

    Hi,
       It's very Urgent! How can i see the Source Code of SAP Provided Variables. I need to write code for User Defined Variables. please help me. It's very Urgent.
    Thanks in Advance.
    Nagesh.

    hi Nagesh,
    sample code for variable exit,
    there is 'how to' docs, can't see your email address.
      DATA: L_S_RANGE TYPE RSR_S_RANGESID.
      DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
      CASE I_VNAM.
      WHEN 'CUMMONTH'.
        IF I_STEP = 2.                                  "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                  WHERE VNAM = 'MONTH'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW      = LOC_VAR_RANGE-LOW(4)."low value, e.g.200001
            L_S_RANGE-LOW+4(2) = '01'.
            L_S_RANGE-HIGH     = LOC_VAR_RANGE-LOW.   "high value = input
            L_S_RANGE-SIGN     = 'I'.
            L_S_RANGE-OPT      = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        ENDIF.
      ENDCASE.

  • How can i see the output of a form

    I am having one driver program and form.From these two how can i see the output.

    Hi Sunny
    You might already know; but for the driver program; a smartform is just a function module.
    (In the smartform; this function module name can be found in the menu tab Environment -> Function Module Name.)
    Note: The FM 'SSF_FUNCTION_MODULE_NAME' is obviously the correct way of getting the FM name from the smartform name !!
    So all you need to do is call this function module passing any variable / tables you need to pass to the smartform from your driver program.
    Hope it helps
    Neer

  • Runtime workbench , how can I see the receipients in the Alert category,

    Hi guys,
    Alert framework;=>
    I have previosly created allert category in runtime wrokbench--->allert configuration.
    Also allert rule is created with that allert category.
    how can i see the recipients defined for that alert category
    appreciate your help
    Iver

    Hi,
    There are two ways one can define the recipients of the configured alerts.
    1)     Fixed Recipients: - Use tcode ALRTCATDEF and select your alert category and click on fixed recipient. tab
    2)     Recipients via User Role: It will help you to define alerts recipients via kind of roles they play.
    For more help on alerts kindly check the below mentioned links :
    alert management Alerts all in one
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60c24b82-6da9-2a10-5a93-f1f729d89787
    The specified item was not found. - Alert Configuration
    Thanks!
    Aditya

Maybe you are looking for

  • Double everything and no iTunes Store connection!

    Hi!  I had a problem with iTunes not connecting to the internet.  Googled the problem and was promted to check my firewall - iTunes is ticked under exceptions so that's not it.  Uninstalled and reinstalled iTunes following the instructions on Apple h

  • Missing functionality in iCal post upgrade

    I have just upgraded to Lion and iCloud on Mac and sync with iPhone and iPad.  The version of iCal on my Mac seems inferior to that in my iPad - no "invitations" button, no "list" option to view calendar and I can't seem to find a way to move to anot

  • Error after updating field and content type

    Hi, I have a feature with a custom list and content type. I changed one field type from Text to Note, and made the same change in my Schema.xml file. But after deploying I get an error when I visit my list. "The file name you specified could not be u

  • Satellite T230D PST4LA-00R008 Atheros AR9285 WiFi / BT driver issues

    Hello, I have replaced HDD in satellite T230D pst4la-00r008 due to HDD failer. i have tried win 7 x86 sp1, win8 and 8.1 x64 and am currently setting up win 7 x64 sp1, i have installed all drivers as recomended by toshiba and cant connect to wifi or i

  • How to create read only Apex items

    Hi, I'm creating a report using Apex items to display the result values inside editable text boxes. They are then referred by using APEX_APPLICATION.G_F02 etc. My requirement is to make the last row of this report (the values for "Total") as non edit