Forum Replies Created

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

  • RE: CASE Statement

    Thanks for all your help the last time....but when pulling the portion into my main query (as seen below) I get an error :

    Msg 102, Level 15, State 1, Line...

  • RE: CASE Statement

    The faster one for my purpose is yours Luke.

    Thanks

  • RE: CASE Statement

    Thanks All!!! It worked.....

    Also, Lowell I can't believe I didn't notice that Select stuck there. Oops.

    Thanks again....

  • RE: CASE Statement

    Luke L -

    That is exactly what I want to do. However, I tried the query and it gives me an error:

    Msg 156, Level 15, State 1, Line 15

    Incorrect syntax near...

  • RE: CASE Statement

    I guess I should have worded it better - the statement you provided works..it pulls out the 1, 8 and 9 and calls them each "unknown"

    1 ------------ value

    8------------- value

    9------------- value

    How...

  • RE: Convert Integer to Decimal

    Thanks Ray M.

    It worked!! That's what I was looking for.

  • RE: Stumbling on a SQL query - Help!!

    It doesn't seem to be an efficient way of doing a cross-tab.

    When doing this:

    exec crosstab 'Select Month FROM GetTotalOf1()

    WHERE Month =1 GROUP BY Month','SUM(Month)','County','GetTotalOf1()'

    It takes 4:31 to run. It...

  • RE: Stumbling on a SQL query - Help!!

    I came across the following crosstab procedure. It's fine with the exception that I can't have more then one done...I want to use this to get the counties...how would you...

  • RE: Stumbling on a SQL query - Help!!

    Yes, I am using more then one query against the function I wrote. Now I am trying to figure out how I can do a cross tab to include the...

  • RE: Stumbling on a SQL query - Help!!

    Hi Lynn -

    Still trying to work it out. Thanks for checking in.

  • RE: Stumbling on a SQL query - Help!!

    Thanks for all your help Lynn. I will figure it out from here.

  • RE: Stumbling on a SQL query - Help!!

    Because what I have in the sample data is only 6 lines....the DB I am working with has thousands. So the output I showed you is a total based off...

  • RE: Stumbling on a SQL query - Help!!

    See example below:

    I have totals for each individual months and then under Frequency you see the Sum for Jan to Dec. I couldn't figure out how to get the frequency...

  • RE: Stumbling on a SQL query - Help!!

    Based on the sample data - lets start with outcome has the number '13'

    So in my table for Outcome there will be numbers from 1 to 13. So say we...

  • RE: Stumbling on a SQL query - Help!!

    Lynn - from what I understand this code will just pull the outcome, staff, etc for 2007. But how would you add all the records for outcome then get a...

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