need help
2 Topicsanyone please help to write a query, urgent requirement
Hi I am having two tables contact and contact category as mentioned below now contact category Contact categoryid type 1 phone 2 mobile contact ID Value Contact CategoryId 1 97867445453 1 1 14343556677 2 2 9783673526 1 3 1 3 1465276127 2 4 18397387309 2 5 0281938978 2 i want to get result entry of type phone and when 'phone' is not available then 'mobile' should display as shown below ID Value 1 97867445453 2 9783673526 3 1465276127 4 18397387309 5 0281938978 please help me how to write sql quey to get above result thank you.579Views0likes1CommentHow to make a fiscal calendar in sql
Hello, On our server, we have a Dim.Calendar table which contains, fulldate (ex: 2020-07-28), dateskey (20200728), dayoftheweek (sunday=1) ,fiscal week number (vary between 1 and 5), fiscalweekstartdate (2020-01-01, firstday of the year, usually it is a sunday), fiscalweekenddate (2020-01-04, a saturday), fiscal period(ex; 202001) , fiscalweekname(ex: 2020-01-w1 until 2020-01-w5 for January). Unfortunately, our dim.calendar goes to 2025-12-31 Does someone can propose me a sql script to reproduce this dim.calendar table let's say from 2010 to 2050 The fiscal year start the first day of the year, end the last day of the year and we have the following number of fiscalweek per month jan 5 feb 4 mar 4 april 5 may 4 june 4 july 5 aug 4 sept 4 oct 5 nov 4 dec 4 thank in advance for your help2KViews0likes0Comments