Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)

  • RE: grouping data

    select

    t1.id, t1.name

    from your_table t1

    where t1.id in (select min(t2.id) from your_table t2 where upper(t2.name) = upper(t1.name))

    CVM.

  • RE: IN Function

    Not sure about the false positives. The way I read :

    SELECT *

    FROM carrier

    WHERE CHARINDEX("'" + CARRIER + "'", @a) > 0

    the single quotes (to the left...

  • RE: Default Value

    quote:


    Hope this will solve your problem

    Try this

    CREATE TABLE mytable

    (

    AccId numeric IDENTITY(1,1),

    ...

  • RE: Generate SQl Script

    Hi Frank,

    I've been reading the thread about 100 times, and I'm still not sure. I think what Manie wants is to know if there is some kind of sp/xp that...

  • RE: a lot of count()s

    Hi there.

    The COUNT() function eliminates null values if you specify the column name. Check out BOL !!

    Example :

    SELECT COUNT(*), COUNT(TITLE), COUNT(TITLEOFCOURTESY) from northwind.employees

    will return

    first column : number of rows in...

  • RE: Set to NULL

    Hello to you,

    It's not the first time that I read something about allowing columns to take NULL values not begin recommended.

    To my point of view, there is a valid opposite...

  • RE: IS NOT NULL vs != NULL

    Dear,

    Yes, indeed, there is a default setting at database level (ANSI_NULLS, not to be confused with ANSI_NULL_DEFAULT)

    If you do :

    sp_dboption @dbname = 'your_db1', @optname = 'ANSI_NULLS'

    sp_dboption @dbname = 'your_db2', @optname...

  • RE: counting records in tables

    Check DBCC UPDATEUSAGE in BOL.

    CVM.

Viewing 8 posts - 1 through 8 (of 8 total)