Forum Replies Created

Viewing 15 posts - 421 through 435 (of 1,229 total)

  • RE: Reset the Number by Column Value using ROW_NUMBER() OVER (PARTITION BY Field)

    Lowell (10/16/2012)


    patelmohamad (10/16/2012)


    Thanks Lowell for instant reply,

    This is my predication, not the actual data

    , actual data is differ from my Example

    in my data it gives me lot of no's 1,2,3.......n...

  • RE: Avg count of cases per day

    kwoznica (10/16/2012)


    ChrisM@home (10/15/2012)[hr

    Sure! Let's start with a function which has been tweaked a little more (less late at night);

    I think you've probably figured out the rest.

    Thanks Chris. That was very...

  • RE: Avg count of cases per day

    kwoznica (10/15/2012)


    ChrisM would you mind walking me through to understand some parts of the iTvf?

    Sure! Let's start with a function which has been tweaked a little more (less late at...

  • RE: confusion in setting up superkey

    deba_20032004 (10/15/2012)


    Dear Sir,

    I am in great trouble, my problem is I have a vendor Table

    which consist of some fields. I explaining the structure below

    Table<Vendor>

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

    fields name

    -----------

    PKID int

    VENDORID int

    VENDORNAME ...

  • RE: do this update even make sense

    -- try this

    select

    MIDIRB,

    IRBT.ID as IRBT_ID,

    IRBT.IRBRATING as IRBT_IRBRATING,

    ACRT.NEGWATCH as ACRT_NEGWATCH,

    Newcolumn = case when ACRT.NEGWATCH = 1 then x.IRBRATING ELSE IRBT.IRBRATING end,

    *

    FROM ACRT

    INNER JOIN IRBT

    ON IRBT.MOODYSRATE = ACRT.MOODYSRATE

    CROSS APPLY (

    SELECT...

  • RE: Char And int

    Jan Van der Eecken (10/15/2012)


    Nice one, Tom! But does the TRY_CONVERT() make the query non-sargeable? Guess it would?

    Good point, Jan. I remember recently Howard W posted evidence that CAST(Datetime AS...

  • RE: Run time of Cursor

    Abu Dina (10/15/2012)


    With 45 cursors in one sproc he will never know which ones are taking the longest unless he implements some logging.

    This is why I suggested he inserts a...

  • RE: Run time of Cursor

    selvakumar.sms (10/15/2012)


    hi all

    i have stored procedure with 45 cursor, so the stored procedure taking long time to finish. is it possible to get running time...

  • RE: Run time of Cursor

    selvakumar.sms (10/15/2012)


    hi all

    this is my small part if code, i dont know which cursor taking more time to consolidate the data.

    Thanks for posting this. The...

  • RE: Columns not in key look up, why?

    yasubmj (10/11/2012)


    Hey all,

    We came across a problem today, no solutions yet, here is the scene, we have a query which uses an index and makes a key look up as...

  • RE: Run time of Cursor

    selvakumar.sms (10/15/2012)


    hi all

    i have stored procedure with 45 cursor, so the stored procedure taking long time to finish. is it possible to get running time...

  • RE: Run time of Cursor

    sql-programmers (10/15/2012)


    Hi Dude,

    Instead of using CURSOR you can try WHILE loop like below example.

    If possible dont use CURSORs in the procedure.

    A well written forward-only readonly cursor will perform...

  • RE: do this update even make sense

    ronan.healy (10/15/2012)


    update acrt

    set dbo.ACRT.MIDIRB = dbo.IRBT.IRBRATING

    from acrt,IRBT

    where dbo.IRBT.id = dbo.IRBT.id +1

    and NEGWATCH = 1

    It won't update any rows because dbo.IRBT.id will never equal dbo.IRBT.id +1.

    Write it as a SELECT...

  • RE: Select column name and values.

    ecom.bigbuy (10/15/2012)


    I have to display unstable column from database, that's why I need like that.

    Can you post sample dynamic SQL procedure?

    What is an "unstable column"?

    Dynamic SQL is covered in BOL...

  • RE: Should I use a nested subquery?

    thomasrichardson2000 (10/15/2012)


    Thanks Chris, I think I need to explain myself a little bit better,

    RepairSheetNr unitnr groupid brandId modelId version Type_Fleet close_date TotalModels TotalModelsInFleet

    5000076 51 EDMN PEUGEOT 207 S 1.4...

Viewing 15 posts - 421 through 435 (of 1,229 total)