Forum Replies Created

Viewing 15 posts - 11,881 through 11,895 (of 15,381 total)

  • RE: Help with CASE please

    So did my query answer what you needed? You said you had the first two figured out?

  • RE: Exists

    derekr 43208 (5/23/2012)


    Sean Lange (5/23/2012)


    See if this wiki article will help in your understanding. Not a very in depth look but it may help you get what is going on.

    http://en.wikipedia.org/wiki/Correlated_subquery

    Thanks

    I'm...

  • RE: Create Status table Column and update

    komal145 (5/23/2012)


    From your query i am getting all the records whose current_step is not "enrollment_analyst and setting sattus = "pending"

    But I need only those records which are in Current_step ="Enrollment_Analsyt"...

  • RE: Exists

    See if this wiki article will help in your understanding. Not a very in depth look but it may help you get what is going on.

    http://en.wikipedia.org/wiki/Correlated_subquery

  • RE: Exists

    derekr 43208 (5/23/2012)


    select

    *

    from

    T1 where exists(select * from sys.databases where name = 'AdventureWorks')

    For the above, the sub-query has to be true or...

  • RE: Help with CASE please

    I have no idea what the @param has to do with it but the following query will produce the results you stated you need.

    select *,

    case IsActive when 0 then...

  • RE: Excel Source via Ole Mixes Columns F1, F2 etc.

    HUH? We can't see what you see and your explanation left me scratching my head trying to figure out what you are even saying.

  • RE: Create Status table Column and update

    Pretty sure I understand what you are looking for but your sample data doesn't match your desired output.

    Take a look at what you stated is desired output.

    107 5 Enrollment Analyst...

  • RE: Instead of insert trigger

    sdodia (5/23/2012)


    That worked perfectly! Thank you so much for your help!

    You're welcome. Thanks for letting me know that worked for you.

  • RE: Instead of insert trigger

    See how this works for you.

    Create Trigger [dbo].[TrgInstdofInsert] on dbo.Proxy Instead of insert as

    BEGIN

    SET NOCOUNT ON

    IF Exists (SELECT * FROM inserted WHERE ClientUserName = 'Anonymous') --only update if there...

  • RE: Instead of insert trigger

    For that matter your insert will not insert anything if there is at least 1 row with anonymous. I will see if I can tweak this a bit. Give me...

  • RE: Group by with SUM function

    I have to agree that your requirements as described are very confusing. In the sample data you posted you don't even have anything < 0. Perhaps if you could post...

  • RE: Instead of insert trigger

    You might also pitch back to whoever came up with this strange requirement that at some point somebody is going to ask about the rows that are explicitly NOT inserted....

  • RE: Instead of insert trigger

    This is really strange requirement but...

    Your update to the table does not meet your stated requirements.

    I also want to keep track of how many 'anonymous' records it is NOT inserting...

  • RE: Query Help

    Sounds like a good candidate for SSIS. The stairway series here is a great start. http://www.sqlservercentral.com/stairway/72494/%5B/url%5D

    --EDIT--

    Is there an echo in here??? Seems like Andy had the same answer as me...only...

Viewing 15 posts - 11,881 through 11,895 (of 15,381 total)