Forum Replies Created

Viewing 15 posts - 4,756 through 4,770 (of 5,393 total)

  • RE: Are the posted questions getting worse?

    Jason, you forgot to mention:

    "put the pork chops in the launcher and aim to a clueless OP or wannabe DBA":-D

    -- Gianluca Sartori

  • RE: LEFT OUTER JOIN Count Question

    OK, that's fine...

    You just have to make a small additional effort and change the sample data you posted into something like:

    INSERT INTO #Table

    SELECT values UNION ALL SELECT values ... etc

    And...

    -- Gianluca Sartori

  • RE: Not in

    GSquared (10/21/2009)


    The Not Exists correlated sub-query will almost certainly end up with the same execution plan as the Left Outer Join. At least, that's what I've seen most times.

    That's...

    -- Gianluca Sartori

  • RE: Record not displaying

    That record belongs to an uncommited transaction.

    What I find strange is that after stopping /starting the service (which I would never have recommended!!!), all uncommited transactions should have gone rolled...

    -- Gianluca Sartori

  • RE: LEFT OUTER JOIN Count Question

    Fill the blanks and you'll get your answer:

    --Drop temporary table

    IF OBJECT_ID('tempdb..#tblStmtChar') IS NOT NULL DROP TABLE #tblStmtChar

    --Create temp test table

    CREATE TABLE #tblStmtChar(

    CSNum smallint NOT NULL,

    CharNum int NULL,

    StmtNum int NOT NULL,

    SurveyNum...

    -- Gianluca Sartori

  • RE: How I can make look like I expert on SQL Server?

    I'll quote myself as Steve did:

    A few answers from these forums won't turn a wannabe DBA into a real DBA.

    He had the job, so, why bother?

    Now we may just hope...

    -- Gianluca Sartori

  • RE: Distinct selection on datetime

    Glad I could help.

    -- Gianluca Sartori

  • RE: Rounding results to 2 decimal places

    Look up the ROUND function in BOL.

    ROUND(number, 2) should do the job.

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    GabyYYZ (10/21/2009)


    I've been wondering if people who accidentally stumble onto the first page of the THREAD and casually go from page to page, not realizing how long it has grown?...

    -- Gianluca Sartori

  • RE: Distinct selection on datetime

    It's very strange that you don't get distinct values, there must be something different within the two records you posted.

    Try grouping by SystemUser, I think this is what you are...

    -- Gianluca Sartori

  • RE: Is linked server up?

    I don't like that script, does too many things behind the scenes.

    Why not simply:

    SELECT TOP 1 1 FROM remoteserver.dbname.dbo.sometable

    or, even better if the remote server is SQL Server

    SELECT TOP 1...

    -- Gianluca Sartori

  • RE: Please Ignore This User -> ItalianOlgi

    A few answers from these forums won't turn a wannabe DBA into a real DBA.

    He had the job, so, why bother?

    Now we may just hope he will study hard and...

    -- Gianluca Sartori

  • RE: Distinct selection on datetime

    Try this:

    SELECT DISTINCT CONVERT(datetime, CONVERT(char(8),LoginTime,112), 112) AS [date], [Applicationtype], [SystemUser]

    FROM DW.ServerLogonHistory

    ORDER BY CONVERT(datetime, CONVERT(char(8),LoginTime,112), 112)

    -- Gianluca Sartori

  • RE: IDENTITY Columns, INSERT INTO, and ORDER BY

    Yep.

    Very easy to try, indeed.

    -- Gianluca Sartori

  • RE: Maintaining log entries after ROLLBACK TRANSACTION

    Great idea, Gail.

    I never have thought about that!

    The main point, however, is that the piece of code (stored procedure, application code etc...) that requested the transaction to start is responsible...

    -- Gianluca Sartori

Viewing 15 posts - 4,756 through 4,770 (of 5,393 total)