Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Need help on a query!!!
Might want to think it over if this is really what you want. What if
the user log in 100 or 1000 times? How will you be able to read the
report? Direct select from the table looks nicer actually. You can
partition on the USERID easily from SQL*PLUS so only unique values are
shown.
jackie_ol_at_hotmail.com (Jackie) wrote in message news:<2c196db8.0210082151.32f567bc_at_posting.google.com>...
> Hi!
> I have a table structured like shown below:
> USERID LOGIN_DATE
> --------- ------------------
> 100200 10-11-2002
> 100200 09-08-2002
> 100200 10-11-2002
> 400300 05-06-2002
> 400300 05-06-2002
> 500200 01-01-2002
> 500200 02-02-2001
> 600100 01-08-2002
>
> I want to write a query that returns a table like this:
>
> USERID LOGIN_DATE1 LOGIN_DATE2 LOGIN_DATE3
> --------- ----------- ----------- -----------
> 100200 10-11-2002 09-08-2002 10-11-2002
> 400300 05-06-2002 05-06-2002
> 500200 01-01-2002 02-02-2001
> 600100 01-08-2002
>
> Can anyone help me?
> Thanks in advance...
Received on Wed Oct 09 2002 - 12:34:12 CDT