Forum Replies Created

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

  • RE: Using Variables / Parameters in a Select

    Not if you're using a constant for a multiplier on latitude...  if you are not using a Cosine based formula, it does not take the curvature of the Earth into...

  • RE: Modify the Auto Number

    Yeah... especially since I might use my pickup to pull a santion out of the building just to get their attention

  • RE: Creating a new table with a unique field

    Yep... I forgot those... the security concerns, that is.  If you are using stored procs, the users don't need huge privs to use the program as they would with embedded...

  • RE: Update rows without using a cursor

    I agree... there's still some info missing...

    Brian, are you simply saying that you want to be able to update any row and insert new rows from the app?

    Or are you...

  • 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...

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