Forum Replies Created

Viewing 15 posts - 6,526 through 6,540 (of 7,608 total)

  • RE: Tempdb issue

    After you issue the command(s) below, the next time SQL starts, tempdb will be sized accordingly.

    Split the 2GB into equal parts, for however many tempdb data files you have.

    For this...

  • RE: linked server issue

    First verify that DTC (Distributed Transaction Coordinator) is up and running properly on both(/all) instances.

  • RE: Red lines under third occurance of a table name

    I think SQL parses things a batch at a time. All your code is in the same batch, and the table is created in that batch. That might...

  • RE: Check if Function EXISTS before adding

    It's a kludge, but when I really needed it, I simply change the db context to tempdb if the function already exists in the main db, then delete the function...

  • RE: Implicit conversion using COALESCE or CASE

    ISNULL() has its own oddities:

    DECLARE @var1 char(1)

    SET @var1 = NULL

    SELECT ISNULL(@var1, 'N/A') -- Result = 'N'

  • RE: Implicit conversion using COALESCE or CASE

    I'd suggest using COALESCE also, keeping in mind the difference between it and ISNULL in regard to data types.

    Given that, in this case you could explicitly CAST the 99 to...

  • RE: substring comparison for last 2 characters

    SELECT

    mt.##col1##, ..., jt.##co11##, ...

    FROM dbo.maintable mt

    LEFT OUTER JOIN jointable jt ON

    --ignore last two bytes of patid if they are alpha, because it's...

  • RE: Delete data and Transaction Logs

    IIRC, partitioned views are allowed in Standard Edition (at least as long as you don't try to update using a distributed partitioned view?).

    As I noted first, a truly partitioned table...

  • RE: Delete data and Transaction Logs

    Ouch -- partitioning would be ideal for that situation.

    Depending on exact circumstances, you might be able to change the current table to be a view that's defined as a concatenation...

  • RE: OS + ldf or mdf + ldf sharing on RAID?

    While performance could be adversely affected, possibly severely, the really big problem, at least for a DBA, with data and logs for the same db on the same drive is...

  • RE: How will work with(nolock) option in select queries

    You could implement some type of SNAPSHOT isolation level. That will prevent the types of errors you get with (NOLOCK) and prevent readers from being blocked by writers.

    See Books...

  • RE: Select full month number (with 0)

    Lynn Pettis (6/12/2013)


    mmartin1 (6/12/2013)


    gmac 41947 (3/1/2013)


    Hi,

    I use

    DATEPART(month, myDate)

    or

    MONTH(myDate)

    the resut is: 2 (if myDate is 2013.02.03). I would like return: 02

    Do you have any solution for this?

    Thans!

    try this

    declare @MyDate datetime

    set...

  • RE: Finding a word\acronym in a field

    WHERE

    ',' + column + ',' LIKE '%[^a-z0-9]LC[^a-z0-9]%'

    Add other char(s) if/as needed; for example, if you prefer that underscore, such as in "LC_AXIS", not be a "word"...

  • RE: Fizz Buzz interview questions for phone screens?

    Evil Kraig F (6/6/2013)


    ScottPletcher (6/6/2013)


    What "expansion"??? This is an interview q only to test thinking ability, like "How many manhole covers are there in NYC?" and other MS classics.

    At...

  • RE: Fizz Buzz interview questions for phone screens?

    Evil Kraig F (6/6/2013)


    ScottPletcher (6/6/2013)


    Evil Kraig F (6/6/2013)


    ScottPletcher (6/6/2013)


    Dird (6/6/2013)


    Sean Lange (6/6/2013)


    MID?

    Yeah, the Q as a whole is a bit meh. I assume he means AVG (to go with the...

Viewing 15 posts - 6,526 through 6,540 (of 7,608 total)