Forum Replies Created

Viewing 15 posts - 1 through 15 (of 32 total)

  • RE: How to get multiple row[columnvalue] into one column

    Will do...thanks alot...it's been a while since I've been on the site.

  • RE: In Operator with Variable

    the split function worked well...thanks alot

  • RE: In Operator with Variable

    I wish I could wish dynamic sql...but it is frowned on at my work. Any other ideas?

  • RE: Convert into Flat Table

    You're right it's not the simplest case

    In response to Ray's question the NameID is just a reference to actual ID number of the...

  • RE: Insert Statement w/ max

    Makes sense and works good. I don't know why when i first try to get the min & max i didn't seem to work. May have been an issue w/...

  • RE: Insert Statement w/ max

    Thanks alot, I could have sworn that I ran that statement and didn't get back the max!

    So now i guess that I can't...

  • RE: Print Dates between Min & Max Dates

    ALL:

    Thanks alot for the advice. The method of creating and querying a table worked best.

    Thanks again.

    Galahad

  • RE: Count & Sum Question

    Thanks, I'll check out the link that might be just what I need...

     

  • RE: Count & Sum Question

    Thanks for your response.  The issue that I'm having is described below:

    In the second join, I use the column ADRStatusCode in the select and the group. By doing this I...

  • RE: Rollup of Columns

    Hi,

    I ended up moving the code in to a new view that references the main one. This code is below:

    CREATE VIEW dbo.VP_KSS_HoursRollup

    AS

    SELECT

     Normal.PERSONFULLNAME,Normal.PERSONNUM,

     Normal.ApplyDate,Normal.LABORLEV6NM,Normal.HomeLaborAcc,Normal.Status,Normal.FTPT,Normal.EMPLOYEEID,Normal.Department,Normal.Unit,

     Normal.CURRPAYPERIODSTART,Normal.CURRPAYPERIODEND,Normal.PREVPAYPERIODSTART,Normal.PREVPAYPERIODEND,Normal.NEXTPAYPERIODSTART,

     Normal.NEXTPAYPERIODEND,Normal.HOMESTARTDATE,Normal.HOMEENDDATE,

     TotalReg,TotalOT,TotalDBL,cast(TotalReg + TotalOT + TotalDBL AS INTEGER(9))as TotalsRollup

    FROM

    (

     SELECT...

  • RE: Rollup of Columns

    Ok, my mental block is gone. I keep forgetting about using derived tables which is so helpfull...

    The sql ran well so i'll just incorporate the additional hours columns (overtime, double)...

  • RE: Rollup of Columns

    Yes your correct. I know it sounds a bit strange but it's sql for a crystal report that needs to be tweaked.

    I'm thinking that I need an extra column for...

  • RE: Rollup of Columns

    I think where the problem was occuring was that I have to select more than column. i.e:

    select PERSONFULLNAME,PERSONNUM,Unit,Department,ApplyDate,SUM(Regular) Total from VP_KSS_Overtime

     where --ApplyDate >= HomeStartDate

      ApplyDate between CURRPAYPERIODSTART and CURRPAYPERIODEND

     --AND DateDiff(day,ApplyDate,CurrPayPeriodEnd)...

  • RE: Re Pivoting a table

    Thanks for the help. I combined your code in my existing sproc which the final version is shown below. I've really learned alot from your advice.

    CREATE PROCEDURE [dbo].[spLoadPunchTrends]

      @InitLoad...

  • RE: Re Pivoting a table

    I've been trying to see how to get this into a stored proc. Basically I think I would need to repeat the select statement for each one of the entry...

Viewing 15 posts - 1 through 15 (of 32 total)