Forum Replies Created

Viewing 15 posts - 76 through 90 (of 608 total)

  • RE: Copying from SQLSMS grid, pasting in Excel, the word "NULL" is pasted!

    eval_stuff (8/13/2014)


    When you do a SELECT and the characters NULL are returned in the results set where there is nothing

    NULL is not nothing, NULL is unknown.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: SQL Job Truncation Error

    Deuce (8/7/2014)


    A trigger that did an insert into a logging table was the cause of the problem. Anyone know why the job would have a problem with a trigger...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Syntax for adding a column with the WAIT_AT_LOW_PRIORITY Option

    WAIT_AT_LOW_PRIORITY is for online index builds

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Dynamic SQL in sp_MSforeachdb

    Can I ask what you are trying to achieve?

    You script is generating an ALTER DATABASE statement using the name of your data file as the database name and using the...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Update Statement with CASE statement

    Something along these lines

    UPDATE [tablename]

    SET

    [Country Code] =

    CASE

    WHEN [No] ='AF01' THEN 'ZA7'

    ELSE NULL

    END,

    [Country Name]

    CASE

    WHEN [No] ='AF01' THEN 'South Africa'

    ELSE NULL

    END

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Format of number

    WHEN Loc.[rent-group] = 'F' THEN COALESCE(CAST(ARENT.[NET-AMT]*12/52 AS DECIMAL(10, 2)),0) /*To work out weekly rent on monthly run*/

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: display numbers 0-9

    WITH CTE AS (

    SELECT TOP 10000

    ROW_NUMBER() OVER (ORDER BY a.object_id) - 1 AS RowNbr

    FROM

    sys.all_columns a

    CROSS JOIN

    sys.all_columns b)

    SELECT

    RowNbr

    FROM

    CTE

    WHERE

    RowNbr <= DATEDIFF(HOUR, '2014-08-07 10:00', '2014-08-07 18:00')

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: how to speed up update statistics full scan

    rajsin7786 (8/6/2014)


    hi,

    i have a 20G table which takes 40 minutes to update statistics with full scan.

    i want to perform update statistics with full scan on a 350 GB table. ...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: how to speed up update statistics full scan

    arrjay (8/6/2014)


    What benefits do you gain from manually updating the statistics on the table in question?

    The auto update uses a small sample rate which may not give you the best...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: What was that field name?

    I'm afraid the answer is wrong, there is no intellisense in Query Analyzer. That product was replaced by SQL Server Management Studio.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Table size is Huge!!!

    Dropping A table will give the most gain.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Query Tuning Index question

    The Non-clustered Index is performing a seek on LANGUAGEID and PRODUCT and using a predicate to filter on PARTITION.

    The Clustered Index is performing a seek on LANGUAGEID, PRODUCT and PARTITION.

    The...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Missing Century in Date

    SQLSeTTeR (7/31/2014)


    Eirikur worked perfect. It did exactly what I needed it to do. Thanks again! 😀

    What about 7/26/19?

    declare @mycutoff date = '01/01/2020';

    select [Date] = CONVERT(VARCHAR(10),CASE WHEN convert(datetime,'7/26/19',1) >= @mycutoff...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: DBA vs Developer

    GilaMonster (8/1/2014)


    Sean, do you have the actual execution plan for comparison? I've seen obscene row estimations before, I suspect caused by the optimiser thinking that a one-to-many join was a...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Trace user with sql server authentication

    So a Windows user logs into your application, then the application logs into the database using SQL authentication. You cannot trace for the original windows login.

    Why don't you login to...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

Viewing 15 posts - 76 through 90 (of 608 total)