Forum Replies Created

Viewing 15 posts - 35,596 through 35,610 (of 49,552 total)

  • RE: filling parameter with SELECT statement

    You're overcomplicating things. No need for the SELECT in that case. You don't need to assign to a separate variable, unless you're going to use that second variable later

    DECLARE @DocIDOne...

    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 write a trigger

    manikandan.chokkalingam (11/30/2009)


    i have three text boxes

    Doesn't sound like SQL to me. SQL has no text boxes. Maybe you can give us some more information, including where these 'text boxes' appear....

    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: Error in inserting into temp table

    No such thing as a GET in SQL. I think you need to take several steps back and explain what it is that you're trying to achieve here.

    The syntax...

    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: updating data

    Please post table definitions, sample data and desired output. Read this to see the best way to post this to get quick responses.

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    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: Error in inserting into temp table

    The insert statement right before the second fetch is only half-done. You need to define what to insert (either a VALUES clause or a SELECT statement)

    Why a cursor? From 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: Basic cursor implementation

    Stay away from cursors. They have their place (rarely) but they should not be used when there's a simple set-based alternative, as there is here.

    Are you trying to learn SQL...

    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: Checkpoint spid preventing dtabase restore

    winston Smith (11/24/2009)


    1. what can cause a checkpoint spid to hang

    Counter question. How did you determine that the checkpoint had hung?

    if i done this in production, would it corrupt 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
  • RE: Basic cursor implementation

    Couple questions.

    Why do you want to do this with a cursor when a single update statement will do the job perfectly well?

    Why are you denormalising the database? How 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
  • RE: How to write a trigger

    For a good introduction to triggers in SQL, please read this: http://www.sqlservercentral.com/articles/Triggers/64214/

    I also have to ask, why do you want to do this? Storing redundant data is usually a bad...

    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 get

    As I said, escape a quote by doubling it. So if you want single quotes within a string, put two of them to make a single ' character.

    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 get

    DECLARE @Input Varchar(20)

    SET @Input = 'Parthi'

    SET @Input = @Input + '''s'

    Select @Input

    Escape a quote by doubling it.

    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: Indexing URLs and eMail address

    RGDavis396 (11/29/2009)


    What is the best way to index on URLS's and email address?

    Same way you'd index anything else. Normal index on the column. Is there some reason you don't...

    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: Page Allocation

    parthi-1705 (11/29/2009)


    I little bit confused with that one.My thing is whether Pages are there in Transaction Log

    No pages in the transaction log. The data file is divided...

    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: tracking a column in sql server database

    arun.sas (11/28/2009)


    Hi,

    Also use this,

    For search in the current database

    select object_name(id)TableName from syscolumns

    where name = ‘your string’

    syscolumns is a deprecated system view and will be removed in a future version....

    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: Updating a variable number of tables with a single update

    vbprogrammer1986 (11/27/2009)


    but note that u can also use a updatable view for update multiple table in one statement.

    But the update must still target a single table, ie with an updateable...

    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 - 35,596 through 35,610 (of 49,552 total)