Forum Replies Created

Viewing 15 posts - 286 through 300 (of 366 total)

  • RE: picking the "best" row out of a set

    Just a thought: TOP is a reserved word in T-SQL and is not part of ANSI-99-SQL. If for some unexplained and undoubtedly ridiculous reason your company changes databases or you work...

  • RE: Slow query help needed!!!!

    Rob I agree that if you truly want to guarantee the order in which the rows are returned you must use ORDER BY. This covers the cases where the...

  • RE: Slow query help needed!!!!

    “ORDER BY is important because relational theory specifies that the rows in a result set cannot be assumed to have any sequence unless ORDER BY is specified. ORDER...

  • RE: Slow query help needed!!!!

    Ron

    One of the most critical factors in a RDBMS is the speed with which it can return data. Logically ordered data is faster to...

  • RE: Problem with Creating Dynamic T-SQL...

    SqlIndia I would suggest that this funciton would work better on the client than on the server. You might want to look at the FileSystem Object in ASP,VB,C++ and Java (not...

  • RE: Primary Key Field - Identity

    This works but you must insert a dummy row or insert at least one row of new data.

    HTH MIke

    USE TEST

    DECLARE @NewSeed int

    SELECT @NewSeed = max(employeeid) FROM Employees

    TRUNCATE TABLE Employees

    SET...

  • RE: Date Conversion

    Since you are using vchar data to store your dates you might want to consider one of these methods of formating your data

    HTH Mike

     

    DECLARE @vDT VarChar(200)

    SET @vDT = '5/12/2005'

    SELECT convert(DateTime,@vDT)...

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

    Now() is used in both EXCEL and ACCESS to return the current date and time.

    But it is undocumented in T-SQL a sure road to trouble.

    HTH Mike

  • RE: Slow query help needed!!!!

    There is some very good informaton located here http://www.sqlservercentral.com/columnists/gvijayakumar/whentousetheorderbyclause.asp

    on INDEXEs. Since you have a clustered index you do not need the ORDER BY CLAUSE as your data is already...

  • RE: Slow query help needed!!!!

    Ron, Remi I try to give credit when credit is due it keeps you guys posting great answers. Ron thanks for suggesting a great soultion that you gleaned from Remi's post. ...

  • RE: Potentially stupid question

    A Variable length character string uses only enough bytes to actually hold the data. You can use the DataLength fuction to retrun the actual number of bytes used. Len() can...

  • RE: Slow query help needed!!!!

    The number of columns will have no effect on searching data in a set solution as SQL uses pointers to indexed columns to search the data. These pointers point to  the memory...

  • RE: Better way to do this?

    Another thought on zip codes is that since they are nominative you can not assume that consective zip codes are geographically connected. If a new post office were to open...

  • RE: Better way to do this?

    Farrell zip codes are numbers although their function is nominative rather than relational. They are used to descripe areas covered by a Post Office. The first number represents a group...

  • RE: Table Size

    Sorry I was not clear. my question is does SQL create and store an array of pointers for clustered indexes?

    Mike

     

     

Viewing 15 posts - 286 through 300 (of 366 total)