Forum Replies Created

Viewing 15 posts - 91 through 105 (of 607 total)

  • RE: Trace user with sql server authentication

    EXEC sp_trace_setfilter @TraceID, 11, 0, 0, @UserName;

    @TraceID - Your trace number

    11 - Column 11 is Login

    0 - Comparison uses =

    0 - Logical AND

    @UserName - Your search string

  • RE: Problem with Round

    CREATE TABLE #t (Valores MONEY);

    GO

    INSERT INTO #t SELECT 1.1;

    GO 6

    SELECT

    SUM(ROUND(Valores, 0)) AS SumRound,

    ROUND(SUM(Valores), 0) AS RoundSum

    FROM

    #t;

    DROP TABLE #t;

  • RE: Disable Unicode output

    You cannot specify a default setting but you can specify the encoding when you generate the results.

    When you run your query the Save Results window has the option. It is...

  • RE: BCP results

    Your question is version specific. From SQL Server 2012 the file will be created.

  • RE: Collation, Unicode & Joins

    Toreador (7/23/2014)


    Sean Pearce (7/23/2014)Some Documentation

    Yes very good.

    Now, how about some actual documentation (from Microsoft), rather than some forum and blog posts that don't actually address the question but just assume...

  • RE: Collation, Unicode & Joins

    Toreador (7/23/2014)


    TomThomson (7/23/2014)


    So then it was just a matter of remembering what the first 4 databases are.

    That's why I don't like the question. It came down to a test of...

  • RE: Collation, Unicode & Joins

    Igor Micev (7/23/2014)


    Question is good, but why would someone use a join with different collations?

    Simply to test ones knowledge of string comparison in a fun question, nothing more.

  • RE: Collation, Unicode & Joins

    stephen.long.1 (7/23/2014)


    Excellent question, Sean, thanks! I had to do some digging on the differences in the collation styles and the names of the first four databases (although I should have...

  • RE: sp_send_dbmail truncates when attaching query results.

    File Version 2011.110.5058.0

    Product Version 11.0.5058.0

    Size 438 KB

  • RE: Collation, Unicode & Joins

    robertjtjones (7/23/2014)


    Good question - although it does ask for the "number of rows or the error" technically the number of rows returned in the result set is 1 🙂

    Well I...

  • RE: sp_send_dbmail truncates when attaching query results.

    Francis S. Mazeika (7/22/2014)


    What version works?

    I tried to copy the dll from sql 2008 and 2012 into 2014 but it did not work.

    Did you restart SQL Server?

  • RE: T-SQL : Problem with WHEN ... CASE

    SELECT ID, Code, Value1

    FROM Table1 T1

    WHERE ISNULL(T1.[Code], 'NULL') IN (@Param)

  • RE: sp_send_dbmail truncates when attaching query results.

    I did some investigation and found the problem, XPStar.dll contains a bug.

    File Version 2014.120.2000.8

    Product Version 12.0.2000.8

    Size 409 KB

    As a workaround, and the method I used to prove my findings, was...

  • RE: Online Restore of Databases

    What about restoring to a temporary database. Then once the restore is complete you can do a drop and rename.

    USE [master];

    GO

    DECLARE

    @DataFile NVARCHAR(255) = N'C:\MSSQL\MSSQL11.MSSQLSERVER\MSSQL\DATA\MyRestoreDemo.mdf',

    @LogFile NVARCHAR(255) = N'C:\MSSQL\MSSQL11.MSSQLSERVER\MSSQL\DATA\MyRestoreDemo_log.ldf';

    IF EXISTS(SELECT * FROM...

  • RE: T-SQL Syntax Gotchas

    manik123 (7/15/2014)


    I am running at sql server 2008 R2... for section 6 i didn't get any error....

    The question states that the script was run against a 2012 instance. Section 6...

Viewing 15 posts - 91 through 105 (of 607 total)