The counter does not need to reset for each date. The date value will always only be one date (sysdate) since the actual date value is not stored in a table. This is for a report, so the counter would click up one number every time a row is returned. Thanks.
On Mar 23, 10:01 am, ddf <[email protected]> wrote: > On Mar 22, 12:58 pm, Martin Fischer <[email protected]> > wrote: > > > > > > > Hi Scott, > > > i´m a GoogleGropus-beginner but i hope you´ll find that useful. > > > For a gapless cycle of numbers i would use the pseudocolumn "rownum". > > > example : select rownum, * from dummytable > > > convert it to char and fill the missing leading "0" with lpad like > > this: > > > select lpad(to_char(rownum),3,'0'), * from dummytable > > > concat the cycle using the pipe like that: > > > select to_char(sysdate,'dd\mm\yyyy') || lpad(to_char(rownum),3,'0') > > from dummytable > > > hope that helps > > > Martin > > > On 20 Mrz., 18:48, Scott <[email protected]> wrote: > > > > I need a way to add a column to a query that will display output based > > > on another date field and append a rowcounter. > > > Format looks like this: > > > 12/01/2008001 > > > 12/01/2008002 > > > 12/01/2008003 > > > 12/01/2008004 > > > 12/01/2008005 > > > 12/01/2008006 > > > 12/01/2008007 > > > 12/01/2008008 > > > 12/01/2008009 > > > 12/01/2008010 > > > > etc > > > > Would I use sequence? > > > Any help is appreciated, thanks.- Hide quoted text - > > > - Show quoted text - > > That might work, however we don't know if thecounteris to be reset > with each new date value, and if that is the case using ROWNUM "won't > fill the bill" as it's not reset until a new result set is generated. > > We really need more information before any suggestions can be made. > > David Fitzjarrell- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en -~----------~----~----~----~------~----~------~--~---
