with a sequence, there is always the possibility of gaps. If gaps are ok, then you can use a sequence. Otherwise, consider not storing your sequential number, but instead, producing it at the time the data is selected. i.e. select to_char(mydate)||rownumber from mytable; you would need to format rownumber, but we can do that later. lets first find out if this is a acceptable solution. If you really need to store the concatenated value there are other things we can suggest.
On Sat, Mar 21, 2009 at 8:22 AM, ddf <[email protected]> wrote: > > > > On Mar 20, 12:48 pm, 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 row counter. > > 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. > > You want to append a 'counter' to an existing date value? Does this > counter need to reset itself for each new date value? Does it need to > be assigned as each row is returned or does it need to be assigned > after the source data has been ordered? > > You haven't provided enough information to make a usable suggestion. > > > David Fitzjarrell > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
