>Help, I'm going mad. (This is a 2 part question)
> SQL 2k, CF5.0
>
> I have a db with a column defined as bit and I'd like to change null values
>to 0. But I can't find a way to select just the null values.
>
> SELECT COUNT(*) AS ct2 FROM table
> GROUP BY sw
>
> gives me three separate counts. Fine. But to count (and eventaully update)
>only where sw = null, I've tried:
> SELECT sw FROM table
> WHERE sw = <cfqueryparam cfsqltype="cf_sql_bit" null="yes">
>
> WHERE sw != 0 AND sw != 1
>
> WHERE sw < 0
> All return 0 records found.
>
> WHERE sw < 1
> Returns same as WHERE sw = 0
>
> Second question. When checking directly against a database, date(timestamp)
>fields can be compared ok. But if I issue the same code against a Q-o-Q, I
>am getting errors. Is there some "trick" to Q-o-Q dates?
>
> Thanks in advance to any and all
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

