Forum Replies Created

Viewing 15 posts - 6,796 through 6,810 (of 7,191 total)

  • RE: T-SQL basic Query

    Mark

    By reading the posts on this site, I think!

    John

  • RE: modifying / replacing text in a text column

    James

    Sergiy is right - you should look at normalising your database by splitting distinct data from your text field into separate columns.  However, to answer your question... look up the...

  • RE: Shrink database outside enterprise manager

    Dan-Ketil

    Yes.  Use the DBCC SHRINKDATABASE statement.  You'll find the syntax in Books Online.

    John

  • RE: Generating weeks of the year

    John

    I've taken the liberty of making the following the Sunday the end date of the week, rather than the Monday that starts the next week, as you have in your...

  • RE: T-SQL basic Query

    Mark

    This uses the undocumented (and unsupported) stored procedure sp_MSforeachdb:

    sp_MSforeachdb

    'use ?

    exec sp_helpfile'

    John

  • RE: Update in batches

    Jeff

    When I used the word "truncate", I was assuming that the original poster will make the correct choice as to whether to back up the log, or just truncate it. ...

  • RE: Update in batches

    Yes, but if you create a job to truncate the log every minute (for example), or to truncate it when it gets to 60% full, then at least you have a...

  • RE: Multiple Keyword search

    Darren

    I recommend that you read this before proceeding, so that you are aware of any pitfalls of whatever method you choose.

    http://www.sommarskog.se/dynamic_sql.html

    John

     

  • RE: UPDATE on table to INNER JOIN with same table.

    Something like this?

    WHERE ins1.createdate IN

     (SELECT createdate FROM tbl_NSP_Inspection

      WHERE InspectionUID @InspectionUID )

    I'm afraid I can't help you on the SQL CE side of things.

    John

  • RE: Problems dropping a table in Query Analyzer

    William

    Is Daily_Transactions the name of the database?

    DROP TABLE Daily_Transactions.dbo.hist

    John

  • RE: Splitting database into seperate files

    The two filegroups would have to be on separate physical disks for there to be any performance improvement.  I've never analysed it, but I would think if you're pulling a...

  • RE: UPDATE on table to INNER JOIN with same table.

    Trystan

    Almost right.  Take the table name out of the first line to leave just the alias:

    UPDATE INS1

    SET INS1.IsLastOfDay 0

    FROM tbl_NSP_Inspection INS1 

    INNER JOIN tbl_NSP_Inspection INS2 

    ON INS1.InspectionUID 

  • RE: Splitting database into seperate files

    Gail

    We have our tables on one filegroup and non-clustered indexes on another.  While this may not provide the best performance in every case, it is a satisfactory generic solution and...

  • RE: Multiple Keyword search

    You should be aware that if you use dynamic SQL in your stored procedure, it will be executed in the security context of the user running the stored procedure, and...

  • RE: Unable to Update

    Oooh - I don't know.  Send it to your favourite good cause.

    Seriously, though - happy to help.

    John

Viewing 15 posts - 6,796 through 6,810 (of 7,191 total)