Forum Replies Created

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

  • RE: Dynamic SQL: IN/JOIN

    It's working now. The following slice of pie was causing a hick-up earlier; I needed to add another single quote to each side of the ResType and StatusCode parameters.

    Non-working code:

    AND...

    "Nicholas"

  • RE: Dynamic SQL: IN/JOIN

    @OperParam works as a drop-down menu containing =, <>, >, <, >=, <= to work with @Date_String. In my parameters folder, available parameters for @OperParam are set as Label: 'Equal...

    "Nicholas"

  • RE: Dynamic SQL: IN/JOIN

    Full query...

    DECLARE @C varchar(4000)

    SET @C = '

    SELECT DISTINCT AL1.user_id_entered, AL1.reservation_id, AL1.start_date, AL1.status_code, AL1.actual_minutes, AL1.scheduled_minutes,

    AL1.customer_abbr, AL2.company_name, AL2.parent_company, AL1.reservation_name, AL1.product, AL1.customer_extend, AL1.category_abbr,

    AL1.reason_code, CONVERT(varchar(3),AL1.start_date,100) AS StartDateMonth, YEAR(AL1.start_date)...

    "Nicholas"

  • RE: GROUP BY Subcase_Number within several columns

    Lynn,

    I tried using that query and I canceled the query after waiting for about 8 minutes. It didn't like that version.

    "Nicholas"

  • RE: GROUP BY Subcase_Number within several columns

    As for the ANSI joins, when I tried switching to ANSI some of the rows were left out. With the old outer joins, the output was 243 rows. With the...

    "Nicholas"

  • RE: Unplanned outages causing bankruptcy

    Thank you, everyone!

    "Nicholas"

  • RE: Unplanned outages causing bankruptcy

    Thank you for your reply! I'm definitely flexible on my thesis since, as a student with no relevant experience in such matters, for the time being I am out of...

    "Nicholas"

  • RE: Conditional parameter

    I need the sql equivalent of this for my ssrs report, of which the user can select any of those conditional operators listed in the first post to tie in...

    "Nicholas"

  • RE: First row output repeating

    I managed to get it working. I can't say what I did because I'm not sure. It was a pain to fix, but it worked out in the end.

    "Nicholas"

  • RE: Exclude duplicates, keep the value with the latest date

    Sean's solution worked. Thank you very much!

    "Nicholas"

  • RE: Oracle CASE statement into SQL Server

    Solved:

    (CASE WHEN YEAR(H.effdt) IN ('2001', '2002') THEN

    (CASE H.review_rating

    WHEN '1' THEN 'Exceeded Way, Exceeded Results'

    WHEN '2' THEN 'Exceeded Way, Achieved Results'

    WHEN '3' THEN 'Exceeded Way, Did not meet Results'

    WHEN '4' THEN...

    "Nicholas"

  • RE: Converting an ORACLE function into a SQL Server function

    Thanks for the reply. I took a good look over the function and what its output was supposed to be and how it plugged into the view script. I was...

    "Nicholas"

  • RE: Retrieve second of three values separated by spaces

    5280_Lifestyle (12/17/2012)


    My brain isn't working right now. I have data such as 'HEYE-B Euro-IPA 69793' and 'HEYE-B RFE-IPA 70940'. I need to retrieve the middle value, such as 'Euro-IPA' or...

    "Nicholas"

  • RE: Set year(columnname1) = year(columnname2)

    robert.gerald.taylor (12/15/2012)


    5280_Lifestyle (12/15/2012)


    I want to set the year in column name 1 to the year that is in column name 2.

    For example,

    update <tablename>

    set year(ColName1) = year(ColName2)

    where month(ColName1) = month(ColName2) and...

    "Nicholas"

  • RE: Set year(columnname1) = year(columnname2)

    Yes, thank you for catching that. They are both of data type datetime.

    "Nicholas"

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