Use of Union or concatenate

  • I want you to include all the data involved in your output so you can see what you are getting. You are not returning the TimeStamp column at all in your results so you don't know what is in it. Your results set should look like this:

    SinceDate SinceDateAsInt ID Rec ID TimeStamp TimeStampAsDate SchedName Rank StartOnCallDate StartOnCallTime FirstLIsting Duration TimeDifference AddDate AddTime Initials

    2005-05-19 55425600 2 70550 55426893 2005-05-19 21:33:00.000 BITTAR&ESKEW 0 38490 1020 YIUM 840 0 38490 1293 TG

  • Ok so I did a query based on the date 5/19/2005 with the schedname ZZOB02

    and here is some of the sample data from that time

    this if from the moncalladd table:

    27055155427287ZZOB0203849410200CARTER, KIMBERLY900038491247LSLSONCALL

    37055255427289ZZOB0203850210200CARTER, KIMBERLY900038491249LSLSONCALL

    47055355427289ZZOB0203850510200CARTER, KIMBERLY900038491249LSLSONCALL

    57055455427289ZZOB0203850710200CARTER, KIMBERLY900038491249LSLSONCALL

    67055555427289ZZOB0203850910200CARTER, KIMBERLY900038491249LSLSONCALL

    and here is from the moncalldelete table:

    1221865855430305ZZOB0203850510200CARTER, KIMBERLY900038491249LSLSONCALL

    1261866255430306ZZOB0203850710200CARTER, KIMBERLY900038491249LSLSONCALL

    1301866655430321ZZOB0203854010200CARTER, KIMBERLY900038491249LSLSONCALL

    [/code]

    and here is the one line of my results that is based on the oncallstartdate but I need it to be on the activity date:

    ZZOB022005-04-17 06:33:00.000LSDeletedWINN OUT TO MINGEA2005-05-20 08:00:00.0002005-05-21 17:00:00.000

  • Once again you have me guessing as to the columns you are presenting especially in your outlier.

    You keep on saying that your outliers are incorrect based on the ActivityDate, but your WHERE clause does not include the ActivityDate it is using the TimeStamp column. That is why keep asking you to post the Date value for the TimeStamp column. I believe that you will see that the TimeStamp column IS in the valid date range. If you want values to be returned based on the ActivityDate then you need to use ActivityDate in your WHERE clause.

Viewing 3 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply