Where there is a NULL in the field, I want it to take a field from one of the tables and add 10 days to it. You need to select one type or the other for the field, the field type can't vary by row. But, if you really do want a hyphen, convert the date to a string:. Also, the distinct is unnecessary in your select statement. The group by already does this for you. Your hyphen in your ELSE statement isn't accepted in the column which is being defined under the datetime data type. You could either:.
It helps you replace NULL values for other values. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 8 years, 5 months ago. Active 5 months ago. Viewed k times. And if possible create another column and add the 30 days. Improve this question. What's wrong with the output you're getting now? Improve this question. Ian Kenney 5, 1 1 gold badge 23 23 silver badges 42 42 bronze badges.
Leolytix Leolytix 1 1 1 bronze badge. New contributor. Incomplete grouping. So there are some with a bmi over 60 or under Double checked BMI ranges and none were under 15 or over Btw: it's a CASE expression not a statement. Add a comment. Active Oldest Votes. Improve this question. Martin Smith k 81 81 gold badges silver badges bronze badges.
Jorge Villatoro Jorge Villatoro 1 1 1 silver badge 4 4 bronze badges. There is a button named "Caps Lock" please turn it off Having all caps is like screaming on the Internet.
Edit your question and make it readable. Readable questions have a much higher chance of getting answers. And what do you want if PunchintervalFinal. For those who are not null leave them the way they are — Jorge Villatoro. Add a comment. Active Oldest Votes. Improve this answer. Bassam Mehanni Bassam Mehanni
0コメント