Forum Replies Created

Viewing 15 posts - 3,331 through 3,345 (of 5,502 total)

  • RE: Need help on T-SQL

    When thinking about it again:

    Why do you need to have separate tables per month?

    Do you have to deal with such a large data volume? Did you consider horizontal partitioning?

  • RE: Need help on T-SQL

    I'm sorry, missDelinda... You provided ready to use sample data so you should expect a coded and tested answer...

    Edit: I decided to use a different style for FromDate and...

  • RE: Need to select data from 2 rows into one row depending on types

    Please have a look at the cross tab article referenced in my signature.

  • RE: Need help on T-SQL

    You should rethink your concept of generating months.

    Instead of dealing with integer data type for your variables you should use datetime (or smalldatetime) together with SET @runningmonth = DATEADD(mm,1,@runningmonth).

    To get...

  • RE: Index consideration.

    Duplicate post.

    Discussion already started here

  • RE: Mentor

    john-902052 (6/11/2010)


    Because I want to get to know the person and go deep with the topic. Here people may or may not answer and only will work against a...

  • RE: Bi-Weekly Pay Period Total Worked Hours

    Please provide table def and some sample data together with your expected result and definition of the variable used in your query in a ready to use format as described...

  • RE: Mentor

    john-902052 (6/11/2010)


    I have been working with T-SQL for a few months now fulltime and have learned some of the things that I need. I would like to take my...

  • RE: Bi-Weekly Pay Period Total Worked Hours

    Jeff Moden (6/11/2010)


    canoedoceanprince (6/10/2010)


    , CASE DATEPART(dw, startdate)

    WHEN '1' THEN 'Sunday'

    WHEN '2' THEN 'Monday'

    WHEN '3' THEN 'Tuesday'

    WHEN '4' THEN 'Wednesday'

    WHEN '5' THEN 'Thursday'

    WHEN '6' THEN...

  • RE: Selecting the earliest month wrapping January to December

    scott.pletcher (6/11/2010)


    ...

    When Lynn posted *exactly* the same comment about the scan *after* I did, you praised her for it.

    Just as a side note: Lynn (Pettis) is male, not...

  • RE: Selecting the earliest month wrapping January to December

    scott.pletcher (6/11/2010)


    If you couldn't glean enough info to work on this from the requestor's initial posts, it's not (only) the clients that are clueless!

    Your solution seems to work for the...

  • RE: How many Records Will Get Selected

    I second Ninja's_RGR'us recommendation regarding the script screenshot.

    For two reasons:

    #1) it requires at least a little more effort to run it before answering (for those who otherwise would just...

  • RE: Pivot query to use returned value as first row.

    jerseyeddiem (6/11/2010)


    Thanks for the help... Is there anything i should do when post is complete???

    The best (in terms of most appreciated) you can do is posting your solution. Not only...

  • RE: Need help in SQL , Subtract column based on the condition in the Row

    Sounds like homework to me...

    Anyway... you need to perform an outer self-join based on ID=ID+1.

    Use the CASE statement to take care of NULL values and different years.

    If those

    Give it...

  • RE: Pivot query to use returned value as first row.

    I assume you need a dynamic solution to cover "flexible" date ranges.

    In this case I'd recommend you start with reading the "crossTab" article refernced in my signature followed by the...

Viewing 15 posts - 3,331 through 3,345 (of 5,502 total)