Forum Replies Created

Viewing 15 posts - 4,381 through 4,395 (of 5,678 total)

  • RE: T-sql to loop through all the tables in the database and delete records

    Jeff Moden (1/14/2011)


    Actually, it's not quite so easy to pull off in the presence of DRI. You'll need code to identify dependencies and that's not always the easiest thing...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Statistics Information For Performance Tuning

    dajonx (1/14/2011)


    Thank you, David!

    I understand that all of the categories are important, but is there some sort of "ranking" that I could use as a guideline? In your example,...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: T-sql to loop through all the tables in the database and delete records

    Dj463 (1/14/2011)


    Hello all,

    I need a dynamic sql script to loop through all the tables in a database and delete records older than certain date.

    Note: i dont want to use sp_msforeachtable...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Better looping - replace for cursor

    @BaldingLoopMan: Loop code has its place, but when the OP specifically states things are taking too long, it's time for that method to move on. In general: if they're...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Best Way to Store this Kind of Data

    AndrewSQLDBA (1/14/2011)


    Nope, not homework. I am a little old to be going to school. I like the ides that you gave for the design of the databases.

    What I am wondering...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Help - Query out of order datetime within a table.

    GilaMonster (1/14/2011)


    This should do the same.

    Index on row_id and it should be OK, though not great performance.

    select *

    from Table_1 a

    inner join Table_1 b on a.rowid = b.rowid -...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Help - Query out of order datetime within a table.

    This is a performance hog, and if this is something you need to regularly run rather than as a cleanup item for the next few days, I'd recommend looking into...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Simple SQL Select query - need help!!!

    Something like this?

    select

    HandheldDeviceActivityID,

    Device,

    UploadDevice,

    DownloadAppVersion,

    UploadAppVersion,

    REtry,

    Received,

    UploadFileGuid,

    Processed,

    Created,

    ReceivedDate

    from

    HandHeldDeviceActivity

    where

    companyid = 1

    and created > '2010-12-1'

    --Absolute of diff in minutes between these two time fields.

    AND ABS( datediff(...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Please help with SQL code

    pwalter83 (1/14/2011)


    Hi Jeff,

    Here is the updated scenario:

    If POL_COUNTRY_CD or POD_COUNTRY_CD in NCV_BL_DHL_TEMP table begins with FR, then use POL_Location_CD / POD_Location_CD and join to MG_LOCATION table to identify continent. If...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Trust People

    djackson 22568 (1/13/2011)


    Todd Payne (1/6/2011)

    On the other hand, if you look at the British SAS (generally considered the worlds best special forces people),

    Yeah, by the Brits! The Australians...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Passed the 70-452 exam!

    Party on, dude! Congratulations.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Sum Group by and avg, difference between Access and SQL?

    ^ What he said, or alter your source table to store the data at the proper precision, which looks like you want decimal ( x, 2).


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Are the posted questions getting worse?

    WayneS (1/13/2011)


    Stefan Krzywicki (1/13/2011)


    I wonder how many kids these days actually have tiddlywink sets.

    I just wonder how many of you kids know what tiddlywink sets are! :w00t:

    They were those things...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Are the posted questions getting worse?

    GSquared (1/13/2011)


    The problem is it would break every single vending machine in the country. Yes, that's the actual primary objection to plastic coins. The Treasury did feasability studies,...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Are the posted questions getting worse?

    WayneS (1/13/2011)


    LutzM (1/13/2011)


    Any of the Threadizens interested in a performance tuning project in the Los Angeles area? Drop me a PM.

    You're in the LA area? I thought you were in...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 15 posts - 4,381 through 4,395 (of 5,678 total)