Sql
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Sql

  1. #1
    Join Date
    Dec 2002
    Posts
    40

    Sql

    Hi All

    I have got two questions.I am trying generate a sql which gives me a Begin time and Ending time.The Data is something like this.

    id eid datetime action
    15172887 102517 11/18/2004 11:34:47 PM Started Call
    15172888 102517 11/18/2004 11:35:36 PM Closed Issue
    15172889 102517 11/18/2004 11:35:36 PM Closed Call

    cid tid
    4088681 0
    4088681 0
    4088681 15172887

    Begin Time can be re-opened call,started call,opened call
    Ending Time can be Closed call
    The call can be attended by multiple persons
    for ex :-

    aaa
    bbb
    ccc
    ddd

    I want the begin time and end time of ddd for a particualr id.

    Please help me out.I need to fix this today.

    It Should be displayed something like this
    id begin time End Time
    1111 11/18/2004 11:34:47 PM 11/18/2004 11:35:36 PM

    My Second Question
    ------------------

    My second question associated with the first.

    i have got columns called product,agent which depends on the id

    The data is something like this

    For Products
    ------------
    Id Product
    81 aaaa
    81 aaaa
    81 bbbb

    I need it to display in the following format

    id Product
    81 aaaa,aaaa,bbbb



    Please get me a solution for these two questions.
    Last edited by mys; 11-30-2004 at 04:35 AM.

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,460

    Thumbs down

    Look here

    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  3. #3
    Join Date
    Dec 2002
    Posts
    40
    Please help me out on this query,i am trying all the resource not getting the solution

  4. #4
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Originally posted by mys
    . . .i am trying all the resource not getting the solution
    Really? Perhaps you could show us what doesn't work.

    Q1: is totally incomprehensible
    Q2: search for "pivot" here: http://asktom.oracle.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width