Forum Replies Created

Viewing 15 posts - 451 through 465 (of 1,923 total)

  • RE: Search Issue

    Mine and urs both will do a table-scan, as is with the case of Splitter. But, urs look tidier and i forgot totally i can use comma to concatenate (i...

  • RE: Search Issue

    Eugene Elutin (3/2/2012)


    ColdCoffee (3/1/2012)


    Hey R.P.R , the OP does not want the rows that have 12 values , instead the rows that contain the value 12 ; look at the...

  • RE: Display yearly data into no of weeks

    Can you please elaborate on what you wnat?

    PLease read the following article on how to post your question http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • RE: CTE Problem

    Henrico Bekker (3/2/2012)


    Thanks, you are definitely onto something here, although the results for the second row calc to 0...

    idcurrmonth ...

  • RE: CTE Problem

    I took the liberty of adding an IDENTITY column to the base table.

    Here is my stab at the issue

    ; with cte as

    (

    select id,currmonth,nextmonth, monthly,startval , cast( (monthly * 2.00) as...

  • RE: Search Issue

    Hey R.P.R , the OP does not want the rows that have 12 values , instead the rows that contain the value 12 ; look at the expected output and...

  • RE: Search Issue

    Dont open multiple thread for the same request. Have patience, people here will for sure attend your question.

    Cross post. Please redirect all replies to this thread http://www.sqlservercentral.com/Forums/Topic1260602-391-1.aspx

  • RE: Search Issue

    Here is one way:

    First setting up test data:

    IF OBJECT_ID('TempDB..#Sample') IS NOT NULL

    DROP TABLE #Sample ;

    CREATE TABLE #Sample

    ( ID INT IDENTITY ,StringVARCHAR(200)) ;

    INSERT INTO #Sample (String)

    ...

  • RE: Problem with update statement

    something like this, may be?

    -- Open a tran

    BEGIN TRAN

    -- Choose data before update

    SELECT * FROM #temp2

    UPDATE t2

    SET t2.val1 = tCrsApp.val1

    , t2.val2...

  • RE: Getting data base on a day (Disk Utilization Report)

    something like this?

    SELECT DISK

    ,CONVERT(CHAR(10),PollTime,120)AS Date

    ,AVG(Utilization)

    FROM Disk

    WHERE CONVERT(CHAR(10),PollTime,120) = '2012-02-20'

    AND name = 'TEST'

    Group by Disk, CONVERT(CHAR(10),PollTime,120)

    Order BY Disk desc

  • RE: Update Problem

    Are you trying do something like this?

    IF OBJECT_ID('TempDB..#Sample') IS NOT NULL

    DROP TABLE #Sample ;

    CREATE TABLE #Sample

    ( Dates DATETIME , wrange VARCHAR(20)) ;

    INSERT INTO #Sample (Dates)

    ...

  • RE: Update Problem

    I have seen that query somewhere 😀

    ANyways, i can what you are trying to do, but why do u need GROUP BY in your code? for every date, you need...

  • RE: Getting data base on a day (Disk Utilization Report)

    Remove all columns from GROUP BY except DISK and add CONVERT(CHAR(10),PollTime,120)

  • RE: Problem with update statement

    CoolDown (3/1/2012)


    I am trying to update val1 and val2 columns based on join of table 1 and table 2 on id column.

    When values are updated for both column,...

  • RE: Update Problem

    baabhu (3/1/2012)


    However try to use isnull(Pricemoney,1) * 100 if you have got any null related columns on the pricemoney. This way the result won't be null.

    That depends on...

Viewing 15 posts - 451 through 465 (of 1,923 total)