Forum Replies Created

Viewing 15 posts - 511 through 525 (of 921 total)

  • RE: Distinct count of records in a table

    quote:


    SELECT count(distinct( BINARY_CHECKSUM(*))) FROM TableName

    The above did run faster at 2:20 (Jonathan's method is 3:03) however, it comes up 145 records shorter....



    --Jonathan

  • RE: SORT_IN_TEMPDB in PK Constraints

    After creating them, you can use this on PKs:

    
    
    CREATE UNIQUE CLUSTERED INDEX pk_Table ON Table(PKCol) WITH DROP_EXISTING, SORT_IN_TEMPDB

    --Jonathan



    --Jonathan

  • RE: Convert Nvarchar to Datetime

    quote:


    I guess there must be some data not in the datetime format in there so will have to pick through and find...



    --Jonathan

  • RE: Convert Nvarchar to Datetime

    
    
    DECLARE @d nvarchar(20)
    SET @d = '21/12/2003 15:22:15'
    SELECT CONVERT(datetime,@d,103)

    --Jonathan



    --Jonathan

  • RE: Running a stored proc on table results

    Use a temporary table instead of a table variable.

    --Jonathan



    --Jonathan

  • RE: finding similar entities

    Perhaps something like this:

    
    
    USE pubs
    go
    SELECT f.Title_Id, p.Pub_Name, f.Type, f.Advance
    FROM Titles f JOIN Titles c ON f.Title_Id <> c.Title_id
    AND (f.Type = c.Type OR f.Pub_Id =...



    --Jonathan

  • RE: Subquery Problem

    
    
    SELECT SD.Permnum AS SDPermnum, SD.Firstname, SD.Lastname,
    SD.Grade, LC.Location2, LC.LocationDesc,
    TD.TeacherID, TD.Firstname as TFirstname, TD.Lastname as TLastname
    FROM Student_Data_Main SD
    INNER JOIN tblLocation LC on SD.Schoolnum=LC.Location2
    LEFT OUTER JOIN Teacher_Data_Main TD...



    --Jonathan

  • RE: SQL Server 7.0 CPU support

    With any application, the scalability curve's slope decreases as processors are added: going from two processors to four processors might increase performance by 50% and going from four processors to...



    --Jonathan

  • RE: WTH does Full-Text Search do 4 me ?

    quote:


    Well for me - I'd like my end users to learn how to use a * rather than a % for starters...



    --Jonathan

  • RE: WTH does Full-Text Search do 4 me ?

    quote:


    Thanks F...

    I wonder why the different syntax between LIKE and CONTAINS. I guess LIKE is older and may eventually be replaced...



    --Jonathan

  • RE: Break up full name col into fname, lname cols

    quote:


    ...btw, sorry to the original poster!

    I wasn't aware of the PARSENAME function.

    Sounds really handy for such situations.

    Frank

    http://www.insidesql.de

    http://www.familienzirkus.de




    --Jonathan

  • RE: Returning Nth row

    I recommend against doing this. Instead use an association table between the table and its possible parameters. But, if you must, make the ID of the parameter table...



    --Jonathan

  • RE: Scientfic Notation problem

    When converting directly from float to a string, you can only control the number of decimal places used with scientific notation if there are more than six digits. Cast...



    --Jonathan

  • RE: restore database file group failed with Msg 4305

    My guess is that you were not always dropping the backup devices between trial runs.

    --Jonathan



    --Jonathan

  • RE: Distinct count of records in a table

    
    
    SELECT COUNT(*)
    FROM
    (SELECT DISTINCT *
    FROM tablename) x

    Ever heard of a primary key?

    --Jonathan



    --Jonathan

Viewing 15 posts - 511 through 525 (of 921 total)