Forum Replies Created

Viewing 15 posts - 12,076 through 12,090 (of 18,923 total)

  • RE: The ARRAY In SQL Server 2000

    Repost :

    Set based is faster that procedural :

    IF Object_id('fnSplit_Set') > 0

    DROP FUNCTION dbo.fnSplit_Set

    GO

    IF Object_id('Numbers') > 0

    DROP TABLE dbo.Numbers

    GO

    CREATE TABLE dbo.Numbers (PkNumber int identity(1,1), dude bit null, CONSTRAINT Pk_Number...

  • RE: Creating a generic audit trigger with SQL 2005 CLR

    Totally agree with Scott on this one.

    What happens if you delete 250 000 rows from a table with 80 columns???

    How do you recreate the whole history of a single row...

  • RE: Write triggers not to truncate table

    And now would be a good time to learn about backup and restore...  Cause no matter what precautions you take, you're gonna screw up one day.  And you must be...

  • RE: GETDATE() -vs- fn NOW()

    No you didn't... make sure you test a lot when dates are included in the where predicates.  It's easy to get bitten by them.

  • RE: GETDATE() -vs- fn NOW()

    Working from memory here, so make sure you retest this.

    DateAdd(D, 0, Datediff(D, 0, GetDate()))

    This should strip out the time part of the date and give the correct results.

  • RE: "primary key" in Table Variable

    Can we see the rest of the code. There's no way we can answer that without testing ourselves.

  • RE: Trigger on a text field

    You have to manually code the insert for the audit AND the main table. The instead option actually "cancels" the insert.

  • RE: substitute to Eval function

    English translation?

  • RE: substitute to Eval function

    You're starting to ask a lot for the server... Maybe you'd be better off using something like excel to do those calculations...

  • RE: substitute to Eval function

    Validate that all characters are either operators (+ , . X / - ( ) ) or numbers (0-9). Everything else doesn't have its place in an equation.

  • RE: substitute to Eval function

    The point is that someone could drop the table, delete everything, update everything as he wishes. It's not a good idea to use something like this without strong validation.

  • RE: Multiple joins

    ... and if you were in need to use that where condition on the B table, you'd have to put that condition in the join like so :

    ON A.id...

  • RE: Multiple joins

    Just a side note.  If you do something like this :

    Select * from A Left Join B ON A.id = B.id

    where B.AnyCol = 'Anything'

     

    You essentially turned this statement back...

  • RE: Non-clustered Index - Why the limit of 249

    The question is WHY?.. and for one I'd like to know to .

  • RE: Need some help with a select statement

    That works too... but that doesn't take the consideration of the time in the date which is very often required in a search.

     

    Also as a best pratice I try to...

Viewing 15 posts - 12,076 through 12,090 (of 18,923 total)