Forum Replies Created

Viewing 15 posts - 496 through 510 (of 921 total)

  • RE: Case Sensitive vs. Insensitive

    quote:


    If case sensitivity is required and the collation of the db or column is not case sensitive, a cast can be used...



    --Jonathan

  • RE: How to format DateTime?

    For use within code, just use:

    
    
    CONVERT(char(8),DateCol,112)

    This will be much faster than a UDF and doesn't really require much more typing.

    And it usually does not make sense...



    --Jonathan

  • RE: Dropping Column

    Use sp_rename to first rename it to something not starting with "#".

    
    
    sp_rename 'table.[# OF MO TO PAY CLS]', 'newname', 'column'

    --Jonathan



    --Jonathan

  • RE: Convert Nvarchar to Datetime

    quote:


    quote:


    I hate dates in sql


    Hey! Come on...



    --Jonathan

  • RE: Convert Nvarchar to Datetime

    quote:


    Oops!

    My apologies

    I hate dates in sql




    --Jonathan

  • RE: Running a stored proc on table results

    quote:


    Your query will result in null because you have not initialized @mail, use

    set @mail = '' 

    or...



    --Jonathan

  • RE: Convert Nvarchar to Datetime

    quote:


    quote:


    SET DATEFORMAT dmySELECT KeyCol, DateColFROM YourTableWHERE ISDATE(DateCol) = 0




    --Jonathan

  • RE: Performance problems while Looping

    Merge your tables into one table with a column for Break Number. Your current schema violates Codd's "Information Rule," forcing you to use hacks like this with dynamic SQL.

    --Jonathan



    --Jonathan

  • RE: Adding Unique Identifiers in a query

    quote:


    Frank, the following is an example of both code and result set

    SELECT DISTINCT *

    FROM CDSCTM_M B

    WHERE NOT EXISTS

    (SELECT *

    FROM...



    --Jonathan

  • RE: Variable Name used for Column Alias

    You would need to use dynamic SQL, e.g.:

    
    
    EXEC('SELECT SUM(Revenue) AS Week' + RIGHT('0' + CAST(@CurrentWeek AS varchar(2)),2) + '
    FROM MyTable
    WHERE SaleDate BETWEEN...')

    --Jonathan



    --Jonathan

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

    quote:


    Just to add

    
    
    %SomeName%

    will not make use of an index, IIRC

    Frank

    http://www.insidesql.de

    http://www.familienzirkus.de




    --Jonathan

  • RE: Viewing SQL 7 DB Recovery Mode

    "Recovery model" was a new concept introduced with SQL Server 2000. The closest thing in SQL Server 7 would be to check the "trunc. log on chkpt." and "select...



    --Jonathan

  • RE: Case Sensitive vs. Insensitive

    You can set the default collation of a database when you create it.

    --Jonathan



    --Jonathan

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

    quote:


    Just a note on using like. If the syntax is always "Somename%", ie., begins with, using

    the following is a much more efficient...



    --Jonathan

  • RE: hashing vs full table scan

    No. As setting up hashing requires table scans, that makes no sense. The logic of not indexing where the values may be "easily hashed" is relevant only to...



    --Jonathan

  • Viewing 15 posts - 496 through 510 (of 921 total)