Hi Z1,
You may also look into the following link (which is basically the same process that George answered):
http://www.sql-server-helper.com/tips/comma-delimited-output.aspx
Hi Austin,
Here's a link that provides a function in computing the age given a birth date and the current date:
http://www.sql-server-helper.com/functions/get-age.aspx
To use it in your query:
SELECT
CASE WHEN [dbo].[ufn_GetAge] ( CAST([Birth_Date] AS
SMALLDATETIME)...
You can find in the following link a function that will return the first day of the week for the given date parameter. The output depends on what is set as the first day of the week (@@DATEFIRST)
http://www.sql-server-helper.com/functions/get-first-day-of-week.aspx
To use it to get Monday, if...
Hi Jeremy,
One option that you can do is if @DOW = 0, then it means that the user wants all the days for that week. Given this, your query will be as follows:
where (DATEPART(dw,e.adm_date)LIKE @DOW OR @DOW = 0) and
e.adm_date >=@startdate AND e.adm_date<=@ENDdate
On another note, if you...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.