Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Posts
    4

    Unanswered: temp variable as column name ??

    Hi ,
    Can anyone guide me to resolve my problem . I need to write a procedure which first looks for the Worker names from WORKER table who satisfies certain criterias , and then Find from another table how many jobs each one has done on each day of a month . I have written a function which will return all days of a particular month, which can be used for the above procedure .If the wrokers are John , Alex and Martin ,( which may vary according to the branch parameter) The report should look like

    Day John Alex Martin
    1/5/2004 4 8 NULL
    2/5/2004 5 9 12
    ------------------------
    etc

    Thanks in advance
    Regards
    Praveen ( praveenvc@rediffmail.com)

  2. #2
    Join Date
    Mar 2004
    Posts
    80
    building a dynamic query or using a grouping function are the options that strike to my mind.can u post the worker table and other table structure
    so that some one may guide you here.

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    How will your client code cope with never knowing how many columns might be returned? Building the row set isn't that hard, but there's no point in doing it unless you can deal with variable result sets (which is NOT as easy as it sounds).

    -PatP

Posting Permissions

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