Forum Replies Created

Viewing 15 posts - 3,196 through 3,210 (of 49,552 total)

  • RE: How to replace multiple items in a column in sql server express table

    Right-click -> tasks -> Import Data. It's below 'generate scripts'

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Using Column Names as Parameters

    I strongly recommend, with only a few columns like you appear to have, to avoid dynamic SQL.

    It's easy to get wrong, and it's prone to horrible security flaws (used,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Are the posted questions getting worse?

    Luis Cazares (4/21/2016)


    BLOB_EATER (4/21/2016)


    Luis Cazares (4/21/2016)


    Brandie Tarvin (4/21/2016)


    Okay, this is weird. I went searching for an error I got in SSIS 2012 and the first thread that pops up in...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How to replace multiple items in a column in sql server express table

    So it will tell you what row, the row in the table with the matching username to the row in the spreadsheet.

    In that case, import the spreadsheet into a database...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: IF, THEN in T-SQL?

    IIF was added in SQL 2014, but in earlier versions you'd use CASE (IF is control flow)

    CASE WHEN [PDT_ORG_4_CDA LIKE 'X%'

    ...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How to replace multiple items in a column in sql server express table

    Oh, so what, in the spreadsheet tells you what row in the table the new email address belongs to?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Using Column Names as Parameters

    You can't parameterise column names.

    If you have a small number of options, separate queries (or better separate procedures). Since the query implies there are only a few columns in the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Get 1st April

    Try this

    DECLARE @CurrentDate DATETIME = GETDATE() --'2016-01-01'

    select DATEADD(qq,1,DATEADD(yy,DATEDIFF(yy,0,DATEADD(qq,-1,@CurrentDate)),0))

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How to replace multiple items in a column in sql server express table

    What's the definition of the table and where is the list of new values?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: A newbie to SQL server

    glen_malcolm (4/19/2016)


    Thanks all of you for your input and advice, next trick is to find out and to learn restore processes...

    The book I linked should have restore details as well.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Guess the RTM Build

    I'll go for a nice round number.

    13.0.1600

    (or if you want it expressed to 4 numbers, 13.0.1600.00)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Where do you install your 2016 RC instances?

    Azure VM loaded with server 2012 R2. The uninstallers and upgrades often tend not to work 100% effectively on CTPs and RCs.

    As for what DB, depends what I'm doing. If...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Trying to retrieve actual execution plan, returns null

    Try using sys.dm_exec_text_query_plan instead of sys.dm_exec_query_plan. You get the same plan back, but it's a varchar/nvarchar type, not xml, and so avoids that error.

    And again, that's not going to be...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: MSG 444 - Select statements included within a function cannot return data to a client.

    A word of caution. Scalar functions can be horrible for query performance. If you're planning on using that function within another query, you're likely to end up with a really...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Are the posted questions getting worse?

    Ed Wagner (4/20/2016)


    GilaMonster (4/20/2016)


    Ed Wagner (4/19/2016)


    SQLRNNR (4/19/2016)


    GilaMonster (4/19/2016)


    And more homework in the forums. Is it wrong to want to post a sensible-looking but completely incorrect query as answers?

    Do it!

    Are you...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 3,196 through 3,210 (of 49,552 total)