Forum Replies Created

Viewing 15 posts - 2,701 through 2,715 (of 5,394 total)

  • RE: No remote connections enabled

    You could also issue this statement on the remote SQL Server (given that you connect via TCP/IP)

    SELECT local_tcp_port

    FROM sys.dm_exec_connections

    WHERE session_id = @@SPID

  • RE: No remote connections enabled

    Jack Corbett (9/15/2011)


    Sounds like firewall to me, but I've exhausted my expertise.

    +1

    Can't be a browser issue, since you're not connecting to a named instance.

    It must be firewall.

  • RE: pivot

    This should help you when output column names (YearQuarter values) are not known from the start:

    IF OBJECT_ID('tempdb..#sampleData') IS NOT NULL

    DROP TABLE #sampleData

    CREATE TABLE #sampleData (

    ...

  • RE: pivot

    I think this should do the trick:

    DECLARE @sampleData TABLE (

    YearQuarter varchar(7),

    Field1 decimal(21,6),

    Field2 decimal(21,6),

    Field3 decimal(21,6),

    Field4 decimal(21,6)

    )

    INSERT INTO @sampleData

    ...

  • RE: pivot

    vick.ram79 (9/15/2011)


    If you took the time to know how to post queries on this forum, you would know ... Its the link in Gianluca's signature. It explains how people should...

  • RE: pivot

    You posted the same exact sample data as before.

    If you post you sample data the way I did, everything is clearer and faster for us to help you.

    "Q2 2010" is...

  • RE: pivot

    Re-read my post: I didn't offer any solution, I just asked you to fix your sample data, as it appears to be mangled.

    If you post sample data, I can post...

  • RE: pivot

    Your sample data doesn't seem to be correct: you have a different number of columns in each row.

    Try posting your sample data in this form:

    WITH SampleData (Quarter, Year, Field1, Field2,...

  • RE: Removing partitioning from a table

    It makes a huge difference: you don't have to create a new table with all contraints, foreign keys, defaults and the like.

    With the index create+move+drop you move just the logical...

  • RE: Removing partitioning from a table

    You could add a clustered index and then move it to the unpartitioned filegroup and drop the index.

  • RE: "NOT IN" REPLACE WITH "MINUS"

    Thinky Night (9/15/2011)


    To optimize the query

    Honestly, I don't think it would run faster with EXCEPT.

    I would look into other things first.

    Do you have an execution plan to share?

  • RE: "NOT IN" REPLACE WITH "MINUS"

    Looks like an academic / interview question.

  • RE: Restarting the sql server agent

    The jobs will stop and, depending on how well they handle transactions, they will rollback completely or partially.

  • RE: Another free T-SQL Formatter, open-source and SQL2K8-compatible, SSMS Add-In

    That's great stuff!

    Thanks for sharing.

Viewing 15 posts - 2,701 through 2,715 (of 5,394 total)