Forum Replies Created

Viewing 10 posts - 16 through 25 (of 25 total)

  • RE: WHERE Clause in PROC Inquiry

    The DATE cast was a mistake. I've corrected some of the mistakes, but am getting an error now that states:

    Msg 206, Level 16, State 2, Procedure Rpt_Vendor_Payment_CP7_Vend_List, Line 0

    Operand type...

  • RE: CASE Assistance

    You guys ROCK. I'm gonna analyze the data closer to make sure the joins are correctly pulling the right amount of records. If I have any more questions, I'll reach...

  • RE: CASE Assistance

    You guys are 100% correct and that's why you're the masters. This query looks good now. I do have one more question about it since it's returning values now.

    A...

  • RE: CASE Assistance

    I want it to say, okay, here is a business class "L", now let's see if there are any other sub classes along with it being a large business.

    V.CL_VET_FL...

  • RE: CASE Assistance

    Hi, I've added the other 3 cases and the sub query to follow like so:

    SELECT CASE WHEN V.S_CL_SM_BUS_CD = 'L' THEN

    (SELECT V.VEND_NAME_EXT

    ,LNHS.CST_AMT

    ,VCHR.VEND_ID

    ,V.CL_VET_FL

    ...

  • RE: CASE Assistance

    I think it needs to be separate columns for reporting purposes because it's going in SSRS. I tried using a case statement like so:

    select case when V.S_CL_SM_BUS_CD = 'L' THEN

    ...

  • RE: CASE Assistance

    Dynamic query may take too much time given my skill set. Could you provide one of the queries and I can work from that method?

    Thanks, Sir.

    MC

  • RE: CASE Assistance

    Yes this could be 4 given the scenario. Will they have to be broken out or can they be done within one.

    Thanks!

  • RE: CASE Assistance

    I think this is on me for not explaining clearly enough. My apologies. So for each case of V.S_CL_SM_BUS_CD, it could be any of the 4 following business types L...

  • RE: CASE Assistance

    This is great. Thanks so much. The problem I'm running into is in the where clause. If I say

    WHERE V.S_CL_SM_BUS_CD = 'F'

    AND 'Y' IN (V.CL_VET_FL, V.CL_SD_VET_FL, V.CL_ANC_IT_FL, V.CL_DISADV_FL, V.CL_WOM_OWN_FL,...

Viewing 10 posts - 16 through 25 (of 25 total)