Forum Replies Created

Viewing 15 posts - 61 through 75 (of 462 total)

  • RE: Need help to built SQL statement

    lmu92 (1/23/2010)


    Did you notice that you've got two answers with sample code after that short time?

    The reason is simple: You provided ready to use sample data! Well done! 🙂

    Cent percent...

  • RE: Need help to built SQL statement

    Just replaced table variable with temp tables

    ;WITH CTE AS

    (SELECT R.TrnxID, RoutecD, R.CoutCD, Sequence, CoutDesc FROM

    #TRouteD R

    JOIN #tCounter S ON R.CoutCD = S.CoutCD)

    SELECT RouteCD,

    STUFF((SELECT '-'+p.CoutCD

    ...

  • RE: how to get only duplicate rows from table

    Exactly!!! and moreover.. you are an 'ssc- addicted'. By now you should be knowing how to post data?

  • RE: How to get this?

    Not sure if there is a better way to do it in 2000 , but if you have the luxury of creating a function, you can do it this way...

    CREATE...

  • RE: Sigh ... weird issue

    vick.ram79 (1/22/2010)


    So I have a table like following:

    CodeName SARatio

    ---------- -------

    AB ...

  • RE: Conversion failed when converting datetime from character string

    ooaaaaaaa!!! see how old this thread was.. .you should've started a new topic..anyhow.. this works.

    Declare @counterdatetime char(24)

    SET @counterdatetime = '2010-01-24 22:30:43:234'

    IF(CONVERT(DATETIME, CONVERT(VARCHAR(24),@CounterDateTime)) >= CAST('1/19/2010 10:44:18

    PM' AS DATETIME))

    BEGIN

    PRINT...

  • RE: How to get this?

    Is this some kind of puzzle 🙂 ?? Care to elaborate a bit?

    Can you tell us what do you mean by 'remaining things'?

  • RE: SP Installation Scripts

    Script all the sps (Obj exploere->right click on db -> tasks -> generate script) from a database, store it in one single sql file, open it in the new...

  • RE: Selecting Individual values from a table

    Just a guess work as you've not given us anything to work with. I think you need a dynamic sql to achieve whatever you are doing?

    Something along these lines??

    CREATE...

  • RE: Modified User

    Thanks Gail, I just looked at the trigger code and it was just there for 'insert' and thought default would do. Your code above should do well for OP in...

  • RE: Modified User

    Well, just to answer your query, one of the way could be this...

    Select SYSTEM_USER.

    But I dont think trigger is the right way of handling it? You can just set the...

  • RE: Obtain Values for Chart

    Thanks for the feedback 🙂 and try to give test data like that in the future whenever you need help and lot of folks here would be ready to help...

  • RE: Obtain Values for Chart

    I mean, applying it to your query, it would become..

    SELECT SUM(CASE WHEN dbo.LK_EXPHistory.Exp_High = 1 THEN 1 ELSE 0 END) AS High,

    ...

  • RE: Obtain Values for Chart

    Since you are relatively new here (SSC), lemme help you with this...

    Is this what you need, may be you need to SUM it instead of count?

    CREATE Table #exp(High bit,...

  • RE: Obtain Values for Chart

    hmm.. bit hard to understand this way.. do you think its possible to simulate and give some test data and table scripts. Read this article on how to do that..

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

Viewing 15 posts - 61 through 75 (of 462 total)