Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. rafrancisco

    order by ip address

    Here's a link that discusses how to sort IP addresses: http://www.sql-server-helper.com/tips/sort-ip-address.aspx
  2. rafrancisco

    Convert multiple rows to one record or variable

    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
  3. rafrancisco

    Help with date calculation/convert function please!

    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)...
  4. rafrancisco

    Datetime manipulation question

    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...
  5. rafrancisco

    Grouping by DOW then HR or just by HR for the whole week

    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...

Part and Inventory Search

Back
Top