Forum Replies Created

Viewing 15 posts - 91 through 105 (of 595 total)

  • RE: Is sequential indexing possible ?

    One thing to watch out for, though: if you have foriegn key constraints that are dependent on the IDENTITY key, then you will have to DROP the constraints before you...

  • RE: Is sequential indexing possible ?

    AHA, now I see what you were trying to do...

    Your best bet is to just create a new table that is a duplicate of your old table, then COPY the...

  • RE: Jay Pipes hit the 500 posts

    Thanks, Frank. Cheers.

  • RE: Is sequential indexing possible ?

    Use the IDENTITY attribute in the ALTER/CREATE TABLE statement to specify the increment value. Look in BooksOnLine, "ALTER TABLE", or "IDENTITY" for more information. BTW, the table is...

  • RE: Too Complex For Me...Maybe You?

    
    
    SELECT
    'Announcement'
    , ItemID
    , ModuleID
    , CreatedByUser
    , CreatedByDate
    FROM Announcements
    WHERE
    DATEADD(d, 0, DATEDIFF(d, 0, CreateDate)) >= DATEADD(d, -7, DATEDIFF(d, 0, GETDATE())
    UNION
    SELECT
    'Document'
    , ItemID
    , ModuleID
    , CreatedByUser
    ,...
  • RE: Help with CASE Statement in Stored Proc

    quote:


    Well, that is not helpful . I ended up changing to "IF..Then" but seems like there should be...

  • RE: execute sp with output parameter

    
    
    -- Be sure to declare variables output in
    -- the execute line of the batch...
    declare @input1 varchar(10)
    declare @input2 varchar(10)
    declare @output1 varchar(10)
    declare @output2 varchar(10)
    --
    execute myProc @input1, @input2, @output1...
  • RE: Time Conversion

    
    
    declare @seconds int
    --
    set @seconds = 124
    --
    select convert(varchar(2), floor(@seconds/60)) + ':' + right('0' + convert(varchar(2), (@seconds%60)), 2)
  • RE: Using T-SQL to display stored procedure

    
    
    select top 100 so.name, sc.text
    from sysobjects so
    inner join syscomments sc
    on so.id = sc.id
    where so.xtype = 'P'
    and patindex('%TableName%',...
  • RE: Help with CASE Statement in Stored Proc

    CASE should go in a SELECT statement. In other words, either change your statement to a SELECT, or change your case statements to an IF block. Remember, CASE...

  • RE: Datetime help

    DECLARE @LockDateBegin SMALLDATETIME

    SELECT @LockDateBegin =

    CASE

    WHEN (DATEPART(dw, GETDATE() = 3

    AND DATEPART(hh, GETDATE() >= 16) THEN

    ...

  • RE: Error 1024

    Books Online suggests putting the database into single-user mode for the during of the operation causing this error, if possible. Also, since you are using TRUNCATE TABLE, it is...

  • RE: Error 1024

    BTW, what version of SQL Server are you running?

  • RE: Error 1024

    Really not quite sure. Unless you can identify some sort of patterns as to when the job fails, I'm not sure why the proc would return that error, particularly...

  • RE: Error 1024

    When do you run such a procedure, and how often? There doesn't seem to anything particularly unusual about the procedure, unless the tables in question are enormous and the...

Viewing 15 posts - 91 through 105 (of 595 total)