User Profile

Collapse

Profile Sidebar

Collapse
ejbatu
ejbatu
Last Activity: Sep 21 '10, 07:19 PM
Joined: May 7 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ejbatu
    replied to Combine Two Tables
    Thank you, but I don't think it will ever work the way I expected it to work.
    See more | Go to post

    Leave a comment:


  • ejbatu
    started a topic Combine Two Tables

    Combine Two Tables

    Hi,

    I'm trying to select distinct records from TableA and TableB below, but I'm getting multiple records. For example ClientID 102 returns 24 record using the query below. What is the best way to avoid duplicated records.


    Code:
    select *
    from TableA a inner join TableB on (a.clientid = b.clientid)
    order by a.ClientID
    Code:
    TableA
    TAiD ClientID	LicenseID   InUse   ProductVersion
    ...
    See more | Go to post

  • ejbatu
    replied to Multiple Row Into Columns
    Okay, that is a good challenge. I'll work on it and get back to you... Thanks.
    See more | Go to post

    Leave a comment:


  • ejbatu
    replied to Multiple Row Into Columns
    Any word on this?... thanks!
    See more | Go to post

    Leave a comment:


  • ejbatu
    replied to Multiple Row Into Columns
    Okay, sorry for not giving you the complete detail… Here a sample of data (separated by pipe |) that I’m working with (TableA and TableB). Basically, the second scenario I’m trying capture is where Jenny Gram on 5/1 punched out at 2:49PM and punched in at 3:25PM, so since there is a break, need duration calculated for that. On other hand, Bob Davis on 4/27 punched out at 6:19pm and punched in at 7:12pm, since it is a new reason, no need to...
    See more | Go to post

    Leave a comment:


  • ejbatu
    replied to Multiple Row Into Columns
    The script provided works great for the original scenario I provided. I just run into a scenario like below:

    Name |EE # |State |First OutPunch |Second In Punch |Duration
    John Smith |123456789 |GA |4/19/2010 19:05 |NULL |NULL
    John Smith |123456789 |GA |NULL |4/19/2010 19:33 |NULL
    John Smith |123456789 |GA |NULL |4/19/2010 20:32 |NULL
    John Smith |123456789 |GA |4/21/2010 13:06 |NULL |NULL
    John Smith...
    See more | Go to post

    Leave a comment:


  • ejbatu
    replied to Multiple Row Into Columns
    This worked great! Thank you
    See more | Go to post

    Leave a comment:


  • ejbatu
    started a topic Multiple Row Into Columns

    Multiple Row Into Columns

    Hi,

    What I need to do next is basically, if you take the person below as an example, from the data below, there are three records for the 19th, so ignore 10:32a and combine 7:05p with 7:33p on the same row and do a duration calculation on another column. Also if the data is two row on the same date, like the 21st, combine the two data and do a calculation for the duration.

    Name |EE # |State |First OutPunch |Second...
    See more | Go to post
No activity results to display
Show More
Working...