Forum Replies Created

Viewing 15 posts - 496 through 510 (of 541 total)

  • RE: INNER JOIN DELETE

    Try this

    Delete[2002_TblFrm8582wsType]

    FROM [2002_TblFrm8582wsType] t1

    INNER JOIN[2002_TblBatch] b ON t1.F0001N = t1.F0001N

    AND t1.statusCode = b.statusCode

    WHERE Finalized = 0 AND --Missing table name for finalized

    t1.statusCode = 'KanAm02' and [2002_TblFrm8582wsType].AutoID = t1.AutoID

    ...

  • RE: data format

    Yeah, this is a great forum. I like the daily emails listed active topics...good stuff.

    Yeah, I was thinking about how to reverse this process. For example, say you...

  • RE: Long, complicated problem (SQL Svr 7)

    Breaking this into two procs may definitely help, but you really need to avoid nesting cursors. That's your performance problem, I'm sure.

    Try to figure out how to do one of...

  • RE: data format

    Yeah! very nice, kkeeffe...always appreciate someone using "While" loops instead of cursors. Below is your code modified to:

    1) Remove @Rowcount variable and use "IF @@Rowcount = 0 Break"...

  • RE: append data into tables using DTS

    novalhendra, if you want actual "Real-Time" updates I have no idea how you would do that across platforms.

    The best I could do would be to do updates to the data...

  • RE: 1st SELECT after INSERT

    And here's the last Sproc. Hope this is helpful...give's you IO and CPU based on what's showing for the Spid. I've found it to be pretty dependable.

    create procedure...

  • RE: 1st SELECT after INSERT

    Yeah, that's weird. Honestly, I never used the 70 Profiler; I'm a newbie and have always used 2K. Never had problems like that.

    There is an answer, but it's a little...

  • RE: append data into tables using DTS

    Yeah, using a staging table is the way to go. You can use all the DTS Data Transformation Task "Fast Load" options, and it makes the column mapping super...

  • RE: Triggers and multiple row updates

    How about not using cursors at all? There are many cheaper ways to loop in SQL. Below is one example; it creates a csv string out of data...

  • RE: Tough sql statement conversion

    Yo, ArthurC. You can use this...it's a derived table with a "Group by" on it. The derived table only returns groups of data having a row count >=...

  • RE: Identifying Unique Rows in Tables

    Or, to bum it a little... 🙂

    DELETEp1

    FROMprospect p1

    JOINprospect p2

    ON(p1.ContractNumber = p2.ContractNumber

    and p1.CustCredAct = p2.CustCredAct and

    p1.Lessor = p2.Lessor)

    WHEREp1.prospectid > p2.prospectid

  • RE: Yukon - T-SQL changes

    I wonder if they will be giving out beta's at PASS?

  • RE: 1st SELECT after INSERT

    Profiler allows you to look at IO and CPU costs per statement; I would think that would be proof enough.

  • RE: DATETIME datatype

    Philip, It uses less CPU, but it has rounding issues just like all the other "Cast(Cast(@date as int) as datetime)". Any time over 12 Noon and the day is...

  • RE: DATETIME datatype

    Philip, I took some time and tested your function against DateDiff-DateAdd.

    CREATE FUNCTION dbo.fnDateOnlyBinary

    (@Date datetime)

    returns datetime

    AS

    BEGIN

    RETURN cast(substring(cast(@date as binary(8)),1,4) + 0x00000000 as datetime)

    END

    CREATE FUNCTION dbo.fnDateOnly_DateDiff

    (@Date datetime)

    returns datetime

    AS

    BEGIN

    RETURN DATEADD(d,DATEDIFF(d,0,@Date),0)

    END

    Here were the...

Viewing 15 posts - 496 through 510 (of 541 total)