Forum Replies Created

Viewing 15 posts - 31 through 45 (of 150 total)

  • RE: Dead Lock SQL SERVER 2000

    I gave only the select statement and the join that is causing the problem,

    If you want I can give you the whole code also

  • RE: Dead Lock SQL SERVER 2000

    Here you go:

    SELECT DISTINCT

    a.AppID

    , CONVERT(varchar(10), a.DateAppRec, 101) AS DateAppRec

    , ch.NameLong AS Dealer

    , CASE WHEN ch.assignedbranch = ch.channelid THEN '' ELSE (SELECT namelong FROM channels WHERE channelid = ch.assignedbranch)...

  • RE: Dead Lock SQL SERVER 2000

    Can somebody help me with the case statement?

  • RE: Dead Lock SQL SERVER 2000

    So I figured it out the select statement that is causing the problem:

    SELECT

    CASE WHEN ch.assignedbranch = ch.channelid THEN '' ELSE (SELECT namelong FROM channels WHERE ch.channelid = ch.assignedbranch) END AS...

  • RE: Date Parameter in Stored Procs

    Thanks Scott, I appreciate your help, but not passing the year, wouldn't it do a count of all the years for that month, for example in future if I do:

    EXEC...

  • RE: Date Parameter in Stored Procs

    So I guess using only this would be a better idea:

    (

    @Month AS DATETIME

    )

    AND (MONTH(CA.decision_date) = @Month)

    EXEC Applications @Month = 10

    this would give me records for October for the current year...

  • RE: Date Parameter in Stored Procs

    somehow this is also not giving me accurate results for September, 2015

    ALTER PROC Application

    (

    @Month AS DATETIME

    )

    AND (CA.decision_date >= DATEADD(MONTH, DATEDIFF(MONTH, 0, @month), 0))

    AND (CA.decision_date <= DATEADD(MONTH, DATEDIFF(MONTH, 0, @month) +...

  • RE: Date Parameter in Stored Procs

    Thanks Scott,

    What I am trying to do is call it in report where user can select the month and year from the drop down menu, If I just use the...

  • RE: Date Parameter in Stored Procs

    Scott, would the following work, its kind of giving me the correct results:

    ALTER PROC Applications

    (

    @Month AS DATETIME,

    @Year AS DATETIME

    )

    AS

    BEGIN

    LEFT JOIN (SELECT COUNT(CA.app_id) AS Approved_Count, SO.source_id

    ...

  • RE: Date Parameter in Stored Procs

    Not just the month, but also by the year.

    thanks

  • RE: Ranking functions

    Figured it out, just had to add DESC

  • RE: Updating one table from another.

    Thanks Jack it works !!!!!!!!!!

    Also what I need to do with State, now I have to convert state_id into state '03' into 'GA'

  • RE: Updating one table from another.

    Thanks Jack, I already had written 50 case statements before your post 😉 your method also works,

    Now going on to the second issue, I also want to add the records...

  • RE: Sending out emails.

    Thanks Michael, I have standard edition..that might be it.

  • RE: Sending out emails.

    After all the hardwork, I realize I don't have the 'Data driven subscription' option. I only see 'new subscription'

    Would anyone know what the problem might be/ or my edition does...

Viewing 15 posts - 31 through 45 (of 150 total)