Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
malakai
Starting Member
8 Posts |
Posted - 2004-05-27 : 18:31:58
|
| I have a computed column which uses ISNULL against a Integer column, and uses a Double column in it's place if it's null. The data_type listed in Information Schema reports the column type as 'Int'. I assume this is because the first para to IsNull is an int type column.My question is simply is there anyway to override this? Can I instruct SQL Server to report and treat this column as Double or better yet a specific Numeric? thanks,-frank |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2004-05-28 : 09:15:12
|
| Not quite sure if this is what you want, but you could define the column as :ColumnG AS ISNULL(CAST(ColumnD AS NUMERIC(18,2)), CAST(ColumnF AS NUMERIC(18,2)))OS |
 |
|
|
malakai
Starting Member
8 Posts |
Posted - 2004-05-28 : 12:29:15
|
| Duh. Thanks, was looking for something more complicated. that's what i needed though. |
 |
|
|
|
|
|