Forum Replies Created

Viewing 15 posts - 10,771 through 10,785 (of 49,552 total)

  • RE: Why SQL server didn't see my Table definition?

    Then just add the declaration and inserts of the table variable into the dynamic string, so that it's the entire thing you posted originally.

    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: Why SQL server didn't see my Table definition?

    What is the exact value of @SQLString? It's not the string built up in previous statements as far as I can see because that contains no reference to the table...

    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: Why SQL server didn't see my Table definition?

    Would you mind posting the code so that it's readable?

    DECLARE @string NVARCHAR(MAX)

    DECLARE @UserMidListTable TABLE

    (

    Id INT ,

    ...

    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: Database restoring,,,,, since 20 hrs

    KcV (12/2/2013)


    yes, i think (99%) didn't checked this option.

    I'm fairly sure you did.

    RESTORE DATABASE <database name> WITH RECOVERY

    If that brings your database online then you did select the option...

    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: Query performance

    Worth noting that a restore clears the plan cache for the restored database, so plans could not have persisted from before the restore.

    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: Database restoring,,,,, since 20 hrs

    Are you absolutely sure that you didn't check the option to allow more log backups to be restored?

    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: Why SQL server didn't see my Table definition?

    You have to alias table variables, and wrapping the table variable name in [] tells SQL that the table in question is a real table in the user database with...

    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: hat is wrong with this insert statement?

    TC-416047 (12/1/2013)


    Would this work?

    Wouldn't it be faster to run it and see if it works?

    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: hat is wrong with this insert statement?

    What goes inside the brackets in your INSERT () are the column names in the table you're inserting into. You have a bad mix of the INSERT ... VALUES form...

    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: Need your help...SQL Developer interview questions..pls

    Different companies will ask different questions. Hell, I used to ask different questions depending on my mood and the candidate's CV. There's no fixed set of questions.

    You say all google...

    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 access the database if I am not an administrator?

    Log in to the DB with the credentials your administrator provides for you, if you're not allowed admin rights, then he'll have set up some lower permission level for 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
  • RE: How can I use MAX() function in another DataBAse?

    Because you referenced a column without a FROM clause.

    select @LastDate=MAX([LastUpdate]) FROM exhibitor.dbo.Maintable.

    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: Database restoring,,,,, since 20 hrs

    What was the exact restore command/options that you 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: Working with Compression and Filegroups

    No where near enough information. Determining optimal IO placement takes a lot of work, a lot of analysis of virtual file stats, index usage, drive latency, etc, etc.

    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: Check Data exists or not

    kapil_kk (11/29/2013)


    GilaMonster (11/29/2013)


    kapil_kk (11/29/2013)


    GilaMonster (11/29/2013)


    INSERT INTO TableB ...

    SELECT ...

    FROM TableA

    WHERE NOT EXISTS (SELECT 1 FROM TableB where <column comparison>)

    Sorry to mention that I also have update the record if data...

    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 - 10,771 through 10,785 (of 49,552 total)