Forum Replies Created

Viewing 15 posts - 57,211 through 57,225 (of 59,066 total)

  • RE: Modify the Auto Number

    If it's the Primary Key, then you may be (will be) destroying referential integrity for other data in other tables.  If it's the Primary Key and you don't have referential integrity,...

  • RE: what t-sql command assigns and returns a unique id simultaneously?

    I'd never use @@Identity because it is not scope sensitive and, in the presence of triggers, will surely return an incorrect value.  Always use SCOPE_IDENTITY for such a thing.

  • RE: Modify the Auto Number

    Yes, it is possible to modify the number by first doing a SET IDENTITY INSERT... here's the syntax from Books Online...

    SET IDENTITY_INSERT [ database. [ owner. ] ] { table...

  • RE: More Working with Dates

    Actually, there is one method that's a few milliseconds faster over a million or so rows...

    SELECT CAST(CAST(datecolumn-.5) AS INT) AS DATETIME)

    As usual, please don't take my word for...

  • RE: Progressive Search / SELECT

    Felix...

    You may want to post some of those custom functions you're talking about... you'd be surprised at how some of them can be speeded up or maybe even eliminated with...

  • RE: Null Date

    And, you still need to determine.... is null a date way back in the past or a date in the future?

  • RE: Consecutive numbering WITHOUT identity


    The destination table has a ROWID field which cannot be an identity key, ...


    Why the heck not?

  • RE: Update rows without using a cursor

    I'm not seeing the pattern here... can you explain how you came to the actions you took and why you need to do the INSERT to begin with?  What do...

  • RE: Creating a new table with a unique field

    Yes, there are some concerns...

    SQL Injection Attacks

    Poor performing code due to recompiles because is really 100% dynamic SQL

    Poor performing code because it's written by GUI experts who might not be...

  • RE: Why is this subject to deadlocks?

    Thanks for taking the time to provide the belated feedback   Lot's of times, you wonder if someone died or what?

  • RE: Using Variables / Parameters in a Select

    This would work...

     SELECT *

       FROM dbo.PostalCodes P WITH (NOLOCK)

      WHERE SQRT(

                POWER((69.1 * (P.Latitude - @Lat1)),2.000)

              + POWER((53 * (P.Longitude - @Long1)),2.000)

                ) <= @Distance

    ...but I believe this only works...

  • RE: Paging a database useing a stored procedure?

    Cool... thanks for the feedback, Mick.

  • RE: Converting date of birth to Age

    "SysDate" "Months_Between"  Are you trying to do this in Oracle or SQL Server?

  • RE: Where to find a lot of data to build a database to practice on?

    DTS the production tables to a development database.

  • RE: Need help with a simple query

    David,

    Tomakeiteasiertotroubleshootyourcodeyoushouldadoptandfollowaformattingstandardthatincludesthepropercasingpunctuationandindention

    Intheprocessofformattingyourwillfindthatmanyproblemswiththecodewillsimplyvanishbecauseyouwillbelookingatthecodemorethanonceaswellasit

    beingeasiertounderstandforevenyou.

Viewing 15 posts - 57,211 through 57,225 (of 59,066 total)