How not to increment rownum...

i have a sql that i am trying to use some kind of funtion where i get my rownum incremented WHEN I WANT IT....So here is the situation....below is my sql ....
select rownum as StudyDay, ssi.phase_day , ssi.phase_day_of_week, ssi.phase_name, ssi.phase_start_date
from vw_study_schedule_interval ssi
and please see below for results grid..
http://img195.imageshack.us/img195/5958/6302009102830am.png
As i am using rownum...obviously i am going to get 1,2,3,4 for the rows untill my end of rows(for my studyday)...but here is what i want to do...when my PHASE_DAY is 1...i want my studyday to be 1 also(do not want the rownum{studyday} to get incremented). so for phase_day 2...i want my studyday to be 2...and so on....so if phase_day is 3 then studyday should be 3 all those rows.....i know i can use CASE funtion, but how can i with this ???

DONT KNOW HOW IT WILL FORMAT HERE...BUT HERE U GO
STUDYDAY  PHASE_DAY PHASE_DAY_OF_WEEK
PHASE_NAME                                                     
PHASE_START_DATE                  
         1          1                 1
Dosing                                                         
20-OCT-08 12.00.00.000000 AM -06:00
         2          1                 1
Dosing                                                         
20-OCT-08 12.00.00.000000 AM -06:00
         3          1                 1
Dosing                                                         
20-OCT-08 12.00.00.000000 AM -06:00
         4          1                 1
Dosing                                                         
20-OCT-08 12.00.00.000000 AM -06:00
         5          1                 1
  STUDYDAY  PHASE_DAY PHASE_DAY_OF_WEEK
PHASE_NAME                                                     
PHASE_START_DATE                  
Dosing                                                         
20-OCT-08 12.00.00.000000 AM -06:00
         6          1                 1
Dosing                                                         
20-OCT-08 12.00.00.000000 AM -06:00
         7          1                 1
Dosing                                                         
20-OCT-08 12.00.00.000000 AM -06:00
         8          1                 1
Dosing                                                         
20-OCT-08 12.00.00.000000 AM -06:00
         9          1                 1
Dosing                                                         
  STUDYDAY  PHASE_DAY PHASE_DAY_OF_WEEK
PHASE_NAME                                                     
PHASE_START_DATE                  
20-OCT-08 12.00.00.000000 AM -06:00
        10          1                 1
Dosing                                                         
20-OCT-08 12.00.00.000000 AM -06:00
        11          2                 2
Dosing                                                         
20-OCT-08 12.00.00.000000 AM -06:00
        12          2                 2
Dosing                                                         
20-OCT-08 12.00.00.000000 AM -06:00
        13          2                 2
Dosing                                                         
20-OCT-08 12.00.00.000000 AM -06:00

Similar Messages

  • How to auto increment a NUMBER(10) datatype

    Anyone know the syntax on how to auto increment a number field every time a new row comes in?
    TIA
    CREATE TABLE loc_color_group_values(
         ID number(10) NOT NULL auto_increment, <----------------
         COLOR_CODE_ID number(10) default 0,
         PROD_LOC_ID number(10) default 0,
         COLOR_GROUP_CODE_ID number(10) default 0,
         PRIMARY KEY(ID)
    );

    Here is an example:
    CREATE OR REPLACE TRIGGER "EXAMPLE_TRIG" BEFORE
    INSERT ON "loc_color_group_values" FOR EACH ROW BEGIN
      IF :NEW.id IS NULL THEN
        SELECT loc_color_group_values_seq.nextval INTO :NEW.id FROM dual ;
      END IF;
    END ;This allows you to overide the sequence without having to disable the trigger.

  • How not to see password in the script?

    Hi all,
    11.2.0.1
    Aix 6.1 5L
    I have a script expdp01.sh
    Which contains:
    expdp system/$1 schemas=HR
    Then I can run the script at  $ expdp01.sh  hrpass
    This is done so that the password will not be hard-coded in the script. Is this a good idea?
    Is there a way to hide the input parameter?
    Thanks a lot,
    zxy

    yxes2013 wrote:
    Hi all,
    11.2.0.1
    Aix 6.1 5L
    I have a script expdp01.sh
    Which contains:
    expdp system/$1 schemas=HR
    Then I can run the script at  $ expdp01.sh  hrpass
    This is done so that the password will not be hard-coded in the script. Is this a good idea?
    Is there a way to hide the input parameter?
    Thanks a lot,
    zxy
    How is this question different from the one you asked two weeks ago?  ==> How not to see database password?

  • I will change my computer, so I'm going to have to sync my iPhone with the new computer. How not to lose my contacts and calendar?

    I will change my computer, so I'm going to have to sync my iPhone with the new computer. How not to lose my contacts and calendar?

    I just need to transfer my contact list on the new computer?
    Ok, thank you for the information!

  • How not to get back on the page i just closed when opening a new session

    How not to get back on the page i just closed
    when opening a new session?
    I do have a live stream radio on now...
    Therefor new session might not be the complete truth.
    Gerard

    A new tab opens by default as a blank tab (about:blank).
    If that isn't the case then an extension has changed that behavior.
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode

  • How NOT to sync game saves between devices?

    Hi there,
    I haven't been able to find out how NOT to automatically sync game saves between devices. I own both an iPhone 4 and an iPhone 5 and I do not want my progress in video games to be synchronized between the devices. There are no in-app settings in any of the games I own regarding this.
    Help please
    Rudy

    Game settings are part of the backup. You'll have to restore your iPad from the latest backup of the iPhone if you want the same game settings on it. But all other settings and data will be transferred as well from the phone, you can't just restore parts of the backup.
    Have a look a this article:
    iTunes: About iOS backups

  • How not to use newsstand?

    How not to use Newsstand?

    Publications that default to be inside newsstand have deliberately coded themselves to be that way. If you want them to be outside of newsstand, then your only recourse is to contact the makers of the publications and say 'hey, I hate newsstand, any way you can give me another option?'
    no guarantee to be sure but maybe if enough people express their issues the publishers will think otherwise

  • Tabs in a page enable horizontal scrolling,How NOT to do that?

    I have a page with 17 tabs, each tab has a different permission group, so each user can see only the tab for his group.
    Some users have access to more than one group, so they can see more than one tab.
    When a user with more than 5 or 6 tabs logs in, that number os tabs enables the horizontal scrolling, making the page looks horrible, and some tabs end up outside the visible area.
    I need to 'break' the tabs in lines, so it does not enable the horizontal scrolling.
    Is it possible to do that?
    Is its possible, how can I do that???

    the best way how NOT to do the scrolling is to have shorter tab names or view on a higher resolution. there is no way to make them default to a new line of necessary.
    Frankly, I would look back at the layout and design aspects of the page because 17 tabs is a TON of information to download each time you access a page even if you cant see them all.
    You could have the information separated as pages instead of tabs or use item level security instead of tab level to fix this problem.

  • Backup not making incremental backups

    I've scheduled Backup to make a monthly backup of my laptop Home folder to CD or DVD. It always makes a full backup, not an incremental. I can't see a setting to change this behaviour.
    Backup on my iMac works as it should - a full backup followed by incrementals.
    Why is Backup on my laptop behaving differently?

    œ강남풀싸롱↔O1O 4444 9374 강남풀싸롱예약 강남풀싸롱문의 강예빈팀장 강남풀사롱$$강남풀살롱$$서울풀싸롱$$강남풀싸롱위치강남풀싸롱강남풀싸롱
    œ강남풀싸롱↔O1O 4444 9374 강남풀싸롱예약 강남풀싸롱문의 강예빈팀장 강남풀사롱$$강남풀살롱$$서울풀싸롱$$강남풀싸롱위치강남풀싸롱강남풀싸롱
    œ강남풀싸롱↔O1O 4444 9374 강남풀싸롱예약 강남풀싸롱문의 강예빈팀장 강남풀사롱$$강남풀살롱$$서울풀싸롱$$강남풀싸롱위치강남풀싸롱강남풀싸롱
    œ강남풀싸롱↔O1O 4444 9374 강남풀싸롱예약 강남풀싸롱문의 강예빈팀장 강남풀사롱$$강남풀살롱$$서울풀싸롱$$강남풀싸롱위치강남풀싸롱강남풀싸롱
    œ강남풀싸롱↔O1O 4444 9374 강남풀싸롱예약 강남풀싸롱문의 강예빈팀장 강남풀사롱$$강남풀살롱$$서울풀싸롱$$강남풀싸롱위치강남풀싸롱강남풀싸롱
    œ강남풀싸롱↔O1O 4444 9374 강남풀싸롱예약 강남풀싸롱문의 강예빈팀장 강남풀사롱$$강남풀살롱$$서울풀싸롱$$강남풀싸롱위치강남풀싸롱강남풀싸롱
    œ강남풀싸롱↔O1O 4444 9374 강남풀싸롱예약 강남풀싸롱문의 강예빈팀장 강남풀사롱$$강남풀살롱$$서울풀싸롱$$강남풀싸롱위치강남풀싸롱강남풀싸롱
    œ강남풀싸롱↔O1O 4444 9374 강남풀싸롱예약 강남풀싸롱문의 강예빈팀장 강남풀사롱$$강남풀살롱$$서울풀싸롱$$강남풀싸롱위치강남풀싸롱강남풀싸롱
    œ강남풀싸롱↔O1O 4444 9374 강남풀싸롱예약 강남풀싸롱문의 강예빈팀장 강남풀사롱$$강남풀살롱$$서울풀싸롱$$강남풀싸롱위치강남풀싸롱강남풀싸롱

  • How not allow music start when conect the iphone5 to other device by using Bluetooth?

    How not allow music start when conect the iphone5 to other device by using Bluetooth?

    Hi Ralph,
    Ty for answer. I connect my iPhone5 to my car audio system by Bluetooth. I can listen sounds from any app installed on my iPhone. The music app starts immediatly, without any command, when the connection via Bluetooth is done. It disturbs me because I want to hear sound from another application. At this moment I do not want to listen to music. I stop the music but it return again and again every time the other app stop momentarily to talk. (This is a navigation app)
    I would like to know how to configure my iPhone5 to avoid this.
    Kind regards
    Edilson

  • How to determine the ROWNUM in a Master Detail Form

    Hello,
    I am working in a Master Detail Form with Orders and Order Items Information; and I created a process that allows the users to select a Product ID on a tabular form, and the next column is populated automatically with the Product Description.
    To achieve that, I followed some instructions by Denes Kubicek (http://apex.oracle.com/pls/otn/f?p=31517:241), but my case is slightly different:
    <ul>I am using a wizard-created tabular form, instead of a manual tabular form; and </ul>
    <ul>Instead of using another page as a Popup to pass the parameter of the ROWNUM, I am using a plug-in called “Tabular Form Super LOV” which is a modified version of the SkillBuilders’ Super LOV that works on Tabular Forms. </ul>
    The Product ID is returned in the correct row by the plug-in; but in the case of the Product Description, it is always returned into the first row; and my problem is that I don't know how to determine the row where the user clicked to call the plug-in.
    I set up an example in apex.oracle.com in case someone would like to look at it:
    Workspace: ediazjorge
    Username: test
    Password: test
    App Name: Sample App
    App Number: 1550
    BTW, I am using Apex 4.1.1.00.23 and Oracle DB 10.3.2.
    Thanks in advance,
    Erick

    Hello VC,
    Thank you for your time and help.
    Unfortunately, it is still not working properly:
    1. When the Popup LOV opens, the first row of the tabular form is 0, the second row is 1, and so on. How can I assign the values starting with 1 and in the format *0001* ? (I am still a novice on Apex and new to JavaScript :-), sorry about that).
    --2. Also, when I close the Popup LOV, the value of P1_ROWNUM is ‘undefined’ again so I'm not sure if the Product Name column will be populated.--
    3. And finally, you are using the jQuery Selector uPopupLOVIcon, which is an attribute of the Cloudy Theme. In my real application (Apex 4.1.1.00.26), my element looks like: *<img src="/i/lov_16x16.gif" width="16" height="16" alt="Popup Lov" alt="List" style="vertical-align:middle;" align="middle" />*. What do you recommend me to use as a jQuery Selector?
    Again, I really appreciate your help and time. I think you solved the most difficult part.
    Thank you so much,
    Erick
    Update: I just found out that the problem with my comment 2 is because I didn’t delete the previous dynamic action that set the value to P1_ROWNUM.
    Edited by: ediazjorge on Sep 18, 2012 11:20 AM

  • JMS - How to configure incremental redelivery intervals for an MDB

    Hi all,
    I noticed that when message delivery in an MDB fails, the time to the next delivery attempt for the message increases with every failed delivery. The intervals are 5, 10, 20, 40 and 60 seconds. After this the interval stays at 60 seconds.
    Now I was trying to find out how to change this behavior, but did not find the appropriate configuration elements in the console or the documentation. What I found are the options to configure "Default Redelivery Delay" in the ConnectionFactory which is set to 0 and in the Queue "Redelivery Delay Override" which is set to -1.
    Both of these settings do not explain the incremental delay. Can anyone tell me how to configure this? Is that part of the MDB deployment descriptors?
    Thanks,
    Chris

    Hi Tom,
    thanks again for your answer :-) I am sorry, i forgot to mention in my initial post, that i had a look at those parameters. But according to the documentation the default values for both are 60 seconds. In my MDB i did not set any of those, so it should not start at 5 seconds like it does but at 60 seconds. Additionally this suspension, I if understood correctly, should only kick in if the JMS resource (I figure this is the queue in this case) is unavailable, which is not the case in my scenario. And as a third the suspension described there is not growing exponentially as I experienced.
    Sorry if I am just thick here, but the documentation just does not look like what I am looking for. Are there any misunderstandings on my side?
    Thanks, Chris

  • How can I increment a variable in LabView ?

    Hello ..
    I'm trying to use LabVIEW to increment a variable, but I can't find the right way to do that !
    I need to declare a variable and assign zero as its value, then increment it by one each time a certain condition is met, and I need it to reset to zero after it reaches a certain value. It's easy to perform these steps using standard C language but here it looks complicated !
    Could someone explain the steps to do that ?
    Thanks!

    I guess trying to explain how to write a state machine would be difficult..
    It should take you 5 mins to implement the solution.  I post so late that it's probably too late for you.
    But here goes.
    Take a While loop with shift registers as shown in the image of an earlier post.  Place a Case Structure inside the loop.  You will need to use an enumerator (usually create a type def control).  Put 2 states into the enumerator:  reset, increment.  Wire the enumerator to the question mark of the Case Structure.  In the increment case of the Case Structure, you place the +1.  In the reset case you simply wire zero '0' as the proper type (dbl, U32, etc) to the right tunnel of the Case Structure.
    In the code somewhere... you need to set the logic to tell the state machine when to reset.  I don't recall reading what that was...  But in any case, you need another shift register to pass the next state to the Case Statement.  Or if that code is embedded into some other code, then it is probably not necessary.  But you will need someting like a selector to choose between Increment and Reset.  Also choose which of the 2 is the default state, probably any of the 2 for now.  The outcome of the logic to reset or increment is obviously wired to the middle terminal of the Select.
    Just curious, since you are in this predicament.  Did you tell your boss that you knew LabVIEW in order to get the job and now you are obviously stuck delivering a solution?

  • Time Capsule not doing incremental backups

    My Time Capsule has suddenly started backing up the whole hard drive every time instead of doing incremental backups.
    How can I fix this? I am running the latest version of Snow Leopard - I have not installed Lion yet.

    see section D in this user tip.

  • How i will increment  one day with Selected date

    hi,
    I have written a code, in this code i have selected a date from calendar. Now i want to know how will increment one day with this selected date. IS there anyone who can help me? please help me.
    With regards
    Bina

    Hi Bina,
    Lets break the task into smaller steps.
    You can research on Google and search on how to Implement the select date or enter date with Javascript.
    Lets assume that the date has been entered into a text box inside a form inside the HTML code like this:
    <form action ="target.jsp">
       <input type="text" value="" name="dateField"/>
       <input type="submit" name="submit" value="submit" />
    </form>When the user clicks the submit button, the form gets submitted, then the form redirects the user to target.jsp
    Inside target.jsp you can add a date like this
    <%
        String dateField = request.getParameter("dateField");
        // Here use substring function to extract the day , month and year from
    // date field.
        Calendar cal = Calendar.getInstance();
        cal.set(year,month,day);
    // assuming you are storing days in an integer field
    int days;
    cal.add(days);
    %>Note that I have used JSP scriptlets, and the above code is somewhat pseudo-code. Since the task is big I suggest that you break it into smaller more specific tasks and then try to implement them by searching on Google for help first.
    If you get stuck with something specific you can ask here.

Maybe you are looking for

  • I am trying to run PASW with Lion.

    I am trying to run PASW with Lion.  I've found a patch that allows it to run, except that it will not do graphs. These always produce this warning: 'Could Not Start Java Virtual Machine. Chart will not be drawn."  Anyone know of another patch for thi

  • Why do I have to remove VI from SubPanel?

    LV 2013, Win7 I have a program where a menu item can open or close a particular window. That window is large, contains 72 SubPanels, each SubPanel contains a single instance of a reentrant VI (called the BLOCK VI). I have a LARGE memory leak (about 1

  • Direction Needed: Storing calculated values from datagrid column in order to call values into graph

    Hi all, I am new to Flex/Flash Builder, actionscript, and mxml, so please be kind. I have developed a small program that has a component that displays a datagrid fed with information out of a mysql db via a php data services connection. Within that s

  • Archiving Billing documents

    HI Colleagues, Needs your help on the below issue. Some of the old Billing documents were not archieved, supposed to be archieved as they are in 1998 and 1999. When I checked the spool for analysis and found the below information. Example: Doc. 00900

  • How can i know the port of my database?

    hello, how can i know the port of my database is working in? ty