October 12, 2005 at 6:41 pm
When ever using the Columns_Updated() Function what is the &14 for?
Thanks,
Erik..
IF (COLUMNS_UPDATED() & 14) = 14
BEGIN
RAISERROR ('These columns can not be updated at the same time', 16, 1)
ROLLBACK TRANSACTION
END
GO
Dam again!
October 12, 2005 at 7:53 pm
Come on Erik, surely you can read Books Online
bitwise_operator
Is the bitwise operator to use in the comparison.
updated_bitmask
Is the integer bitmask of those columns actually updated or inserted. For example, table t1 contains columns C1, C2, C3, C4, and C5. To check whether columns C2, C3, and C4 are all updated (with table t1 having an UPDATE trigger), specify a value of 14. To check whether only column C2 is updated, specify a value of 2.
comparison_operator
Is the comparison operator. Use the equal sign ( = ) to check whether all columns specified in updated_bitmask are actually updated. Use the greater than symbol ( > ) to check whether any or some of the columns specified in updated_bitmask are updated.
column_bitmask
Is the integer bitmask of those columns to check whether they are updated or inserted.
--------------------
Colt 45 - the original point and click interface
October 12, 2005 at 8:18 pm
Hey Phill - if everyone read BOL then you'd be out of a job...
Eric...here're a link to an article by the "database geek" who's featured in today's front page...itzik ben-gan
...this is only if you want to get some more info on bitwise operators etc.. in addition to what phill & his BOL friend have provided..
**ASCII stupid question, get a stupid ANSI !!!**
October 12, 2005 at 8:21 pm
"Hey Phill - if everyone read BOL then you'd be out of a job..."
Actually, I might be able to do a bit more SQL 2005 investigation and training...
Not to mention Cricket, Robotics, Reading and RPG Games ...
--------------------
Colt 45 - the original point and click interface
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply