Forum Replies Created

Viewing 15 posts - 2,131 through 2,145 (of 2,904 total)

  • RE: HOT TIP on posting!!!!!!!

    I found it out totally by accident. I was typing fast and managed to slip and hit the shift when I hit the enter key. I saw what happened and...

  • RE: [SQLSTATE 01000] within SP output

    Is there more to the error message than just [SQLSTATE 01000]?

    Everything I've seen on Microsoft's site indicates there should be more to the error message.

    Basically, the SQLSTATE 01000 indicates an...

  • RE: [SQLSTATE 01000] within SP output

    It appears my attempt to help you irritated you instead. That was not my intent.

    You never said you checked the BOL or I would not have posted that suggestion.

    I...

  • RE: Question : Error 927 : Database xxx cannot be opened.

    You can't use a database when it's being restored.

    That said, if it's been restoring for a while - it's possible the restore was done incorrectly.

    You didn't give enough information...

  • RE: [SQLSTATE 01000] within SP output

    First, I don't get that on ANY of my jobs.

    Second, I did find out information about that in the BOL. Use the Index tab and enter SQLSTATE. Then select the...

  • RE: Date Search

    I tried my suggestion and it worked just fine. I do have a different collation, but here's what I ran:

    First I checked the amount of records....

    SELECT  *

    FROM MyTable

    WHERE  mycolumn >= '2004-03-31 00:00:00' AND...

  • RE: Date Search

    The conversion shouldn't be causing any problems since it's converting it to dd/mm/yyyy (103 format). And the dates you are comparing it to are also strings (they are between the...

  • RE: 24/7 To Kill or not To Kill

    To clarify what I said....when I have a user who is 'hogging' up the system with a query; I KILL it. But I tell them first and have them send...

  • RE: Backing up raw files instead of db dumps

    If you are 'snapshotting' the .mdf/.ldf files, this usually isn't a good thing. I suggest trying to restore one of the 'snapshots' to see if it really works.

    There are two...

  • RE: Date Search

    Then why use BETWEEN? Change it to:

    SELECT  *

    FROM MyTable

    WHERE     TimeStamp >= '29/03/2004' AND TimeStamp <= '05/04/2004'

    ORDER BY TimeStamp

    Or sticking with BETWEEN, maybe you could do this:

    SELECT  *

    FROM MyTable

    WHERE  CONVERT(VARCHAR(10),TimeStamp,103) BETWEEN '29/03/2004' AND '05/04/2004'

    ORDER...

  • RE: 24/7 To Kill or not To Kill

    Yes, you can run DBCC INDEXDEFRAG. Look it up in the Books OnLine. This is a three step process, first it compresses the index, then it defrags/repages it, then it...

  • RE: IP Phone

    Do you have the owner's manual for the phone? That should tell you how to do what you want.

    If you don't have the owner's manual, who made the phone? Go...

  • RE: Creating a conditional alter table script?

    It's a VIEW.

    Refer to the Books OnLine (BOL), use the Index tab and enter INFORMATION_SCHEMA. You'll see a whole list of these views.

    -SQLBill

  • RE: datetime types - Getting Rid of that darn time

    Here's a SELECT that shows two other ways to do what you want. One uses DATEADD and DATEDIFF, the other uses one CONVERT.

    SELECT DATEADD(HOUR,0,DATEADD(DAY,DATEDIFF(DAY,0,GETDATE()),0)),

           CONVERT(VARCHAR(10), GETDATE(), 121) + '...

  • RE: way to run a query against all dbs?

    You could use the undocumented stored procedure 'sp_msforeachdb'.

    From The Guru's Guide to Transact-SQL by Ken Henderson:

    Procedure:

    sp_msforeachdb

    @command1

    @replacechar = '?'

    [,@command2]

    [,@command3]

    [,@precommand]

    [,@postcommand]

    Purpose:

    Executes upto three commands for every database on the system. @replacechar will be replaced...

Viewing 15 posts - 2,131 through 2,145 (of 2,904 total)