Viewing 15 posts - 4,786 through 4,800 (of 10,144 total)
Or this:
SELECT
active_flag = CASE WHEN c.active_flag = 1 THEN 'Active' ELSE 'Inactive' END,
c.name,
c.company_code,
d.active_users,
d.new_users,
d.inactive_users,
test_company_flag,
parent_company_flag
FROM dbo.company c
LEFT JOIN (
SELECT
company_code,
active_users= SUM(CASE WHEN active_flag = 1 AND unregister_flag = 0 THEN 1...
April 18, 2013 at 6:54 am
Divya Agrawal (4/18/2013)
April 18, 2013 at 5:15 am
-- Group the data by month and by weeks, where a week runs from sunday to saturday
-- account for a week spanning two months
SELECT
v.SchedProv, x.Weekno, x.[Month],
EarliestApptForWeek =...
April 18, 2013 at 5:09 am
Dwain, Jeff - you guys crack me up! As if I didn't have enough pressure from the escaped dust bunnies 😀
April 18, 2013 at 1:19 am
Divya Agrawal (4/18/2013)
Great post!! thanks for sharing..it is really very useful
Thank you very much, Divya!
April 18, 2013 at 1:15 am
roman 19626 (4/17/2013)
What about if I want same scenario between 1.4.2013 and 14.42013? So each day within this date range is displayed as column?
Can you show what you mean by...
April 18, 2013 at 1:12 am
28.kanikasoni (4/17/2013)
I want to use 2 statements in case of when matched clausei.e
Update all the values of Vacancy.TB_FTSearchData
also
update the VacancyFTSupdated from table vacancy.TB_Vacancy
The simple answer is -...
April 18, 2013 at 1:10 am
Tim Walker. (4/16/2013)
The fact that it is also genuinely very useful and will help me to...
April 16, 2013 at 9:29 am
Jeff Moden (4/16/2013)
Awesome job, Chris. Well done!
Thanks Jeff! And thank you for the encouragement to put pen to paper. DC's been nagging me for ages. Once you stepped in...
April 16, 2013 at 9:27 am
Here's an iTVF which might do what you want. You will need to check that the xml concatenation can deal with the characters you wish to include:
ALTER FUNCTION [dbo].[ifn_RemoveUnwantedChars]
(@strTarget...
April 16, 2013 at 8:46 am
Pothiraj R (4/16/2013)
Thanks for the query. I didn't use the syntax like this.
FROM (VALUES ('ooo'),('bbb'),('ccc'),('ddd'),('eee'),('fff'),('ggg'),('hhh'),('iii'),('jjj'),('kkk'),('lll')) d (name)
In the same scenario, I will use UNION ALL with SELECT or insert...
April 16, 2013 at 8:17 am
KoldCoffee (4/16/2013)
Thank you.
Any time.
April 16, 2013 at 8:15 am
mrinal.technology (4/16/2013)
I have a SQL query with couple of nested queries (query at the bottom for the reference), now the very first time I execute the query on a SQL...
April 16, 2013 at 5:51 am
pnr8uk (4/16/2013)
The script looks like a thing of beauty and works nicely....
Intrigued...
April 16, 2013 at 4:47 am
pnr8uk (4/16/2013)
Will be...
April 16, 2013 at 4:28 am
Viewing 15 posts - 4,786 through 4,800 (of 10,144 total)