Viewing 15 posts - 136 through 150 (of 582 total)
Your default will still work even if the column is nullable. But if you can't allow the column to contain nulls under any circumstances (e.g. mistake in app code), and using...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Yes, and therefore not to be relied on.
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Get out of my face
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
alter table Table_name add Age_range as cast(Age_start as varchar(10)) + '_' + cast(Age_end as varchar(10))
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
You should use an indexed calculated column since that way the data is maintained automatically and can't be overwritten:
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Is the datetime an end time, or a duration (i.e. 0 duration = 1 jan 1900)? In the former case, you could use the code below (though you will have...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
no probs
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Thanks
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Peter, can you come up with an example in which my solution doesn't give the right result? (Clue: the answer is no.)
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
A compromise between
1. a lookup table with app,user,dtype (which would involve some odd joins anyway with the <> and the ELSE) and
2. just putting a slab of code...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Ta muchly
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Viewing 15 posts - 136 through 150 (of 582 total)