Calculate the age based on the age

Assignment Help Database Management System
Reference no: EM131474881

I have date of birth column in my table and I want to calculate the age based on the age that will reach 65 within 6 months from the date of the report generated  and that would be treated as  Medicare else no eligible for Medicare

I started to code in T-sql as

getdate() as today case when datediff(yy,m.date_of_birth ,getdate()) as age

case  WHEN DATEADD(MONTH, DATEDIFF(YEAR,m.date_of_birth ,getdate())  ,m.date_of_birth)(I do not know wether it works )

-------

-------

-------

------

Make use of CASE when if possible

I need to display the age with the months too.

The logic should be in a such a way that you display the age in such a way (the condition is when the age reaches 64 yrs 6 months, it should treated as Medicare else no Medicare)?.

Reference no: EM131474881

Questions Cloud

Find the real zeros of the polynomial function : Find the real zeros of the polynomial: Use the Intermediate Value Theorem to determine if the function. Find the domain of the function.
Discuss the strategy of your organization : BUS302 - The Internet a typhoon force, a ten times force, or is it a bit of wind? Or is it a force that fundamentally alters our business
Imperfect distribution of income : In reference to labour markets in professional sports, discuss how players are paid.
Canadian treatment of foreign corporate incomes : Which of the conditions fits the Canadian treatment of foreign corporate incomes best? equal?
Calculate the age based on the age : I have date of birth column in my table and I want calculate the age based on the age that will reach 65 within 6 months from the date of the report generated
Entering foreign markets and corporate social responsibility : savvy entrepreneur, entering foreign markets and corporate social responsibility.
Determine the code words for the ten decimal digits : Determine the code words for each of the ten decimal digits in the weighted code (63 -11). The code should be self-complementing.
Linear compensated demand curve : Another friend, who happens to be a history major, sees the formula for excess burden under a linear compensated demand curve and remarks:
Discuss about the behavioral heuristics : What other statistically relevant factors did you/they fail to incorporate? How could you have altered the framing of the situation to make a better decision?

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd