Viewing 15 posts - 4,501 through 4,515 (of 15,381 total)
Eirikur Eiriksson (6/11/2014)
Grin aside, the last comment is uncalled for, it will not earn you any respect.
I don't think Joe is all that worried about earning respect. Might be worth...
June 11, 2014 at 2:25 pm
crookj (6/11/2014)
Ed Wagner (6/11/2014)
Kurt W. Zimmerman (6/11/2014)
Ed Wagner (6/11/2014)
JAZZ Master (6/11/2014)
Sean Lange (6/11/2014)
Ed Wagner (6/11/2014)
Sean Lange (6/11/2014)
Ed Wagner (6/11/2014)
crookj (6/11/2014)
Sean Lange (6/11/2014)
Ed Wagner (6/11/2014)
Revenant (6/11/2014)
eccentricDBA (6/10/2014)
TomThomson (6/10/2014)
sing4you (6/10/2014)
Stuart Davies (6/10/2014)
Sean...
June 11, 2014 at 12:32 pm
Agreed. UNPIVOT would be a better choice here.
June 11, 2014 at 10:19 am
This works for your sample data.
select s.Closing as ClosingDate
, p.Name as Project
, s.Amount as TotalSales
, sum(case TaskCode when 'Task1' then 1 end) as Task1
, sum(case TaskCode when 'Task2' then 1...
June 11, 2014 at 10:19 am
ChrisM@Work (6/11/2014)
Sean Lange (6/11/2014)
SQLSteve (6/11/2014)
June 11, 2014 at 9:55 am
sharonsql2013 (6/11/2014)
Sure will do.Thanks a lot.Made my day! Saved me a lot of work.
You're welcome. Glad that worked for you. 😀
June 11, 2014 at 9:37 am
SQLSteve (6/11/2014)
June 11, 2014 at 9:32 am
sharonsql2013 (6/11/2014)
select datepart(mm, cast( Month_Year as datetime)) gives conversion error too
Of course it won't convert. "Apr-2014" is not a valid date. This kind of stuff would be SO much easier...
June 11, 2014 at 9:30 am
Your sample output doesn't seem to match your sample data but I think you want something like this.
select SalesDate, 'apples' as FruitSales, AppleSales
from #fruitSales
union all
select SalesDate, 'oranges', OrangeSales
from #fruitSales
order by...
June 11, 2014 at 9:21 am
Hi and welcome to the forums. In order to help we will need a few things:
1. Sample DDL in the form of CREATE TABLE statements
2. Sample data in the form...
June 11, 2014 at 9:17 am
Hi and welcome to the forums. In order to help we will need a few things:
1. Sample DDL in the form of CREATE TABLE statements
2. Sample data in the form...
June 11, 2014 at 9:16 am
sharonsql2013 (6/11/2014)
For query purposes , i need to get only month numbers and year as seperate columns
Like Apr = 4
How...
June 11, 2014 at 9:15 am
Ed Wagner (6/11/2014)
Sean Lange (6/11/2014)
Ed Wagner (6/11/2014)
crookj (6/11/2014)
Sean Lange (6/11/2014)
Ed Wagner (6/11/2014)
Revenant (6/11/2014)
eccentricDBA (6/10/2014)
TomThomson (6/10/2014)
sing4you (6/10/2014)
Stuart Davies (6/10/2014)
Sean Lange (6/10/2014)
Ed Wagner (6/10/2014)
Sean Lange (6/10/2014)
JAZZ Master (6/10/2014)
Bootsy Collins
Drink
Please!!!
Thanks
funkedelic
cool
bodacious
90's
80's Music
totally
Rad
Righteous
Bitchin'
Hair
BIG
June 11, 2014 at 9:12 am
SQLSteve (6/11/2014)
June 11, 2014 at 9:12 am
Ed Wagner (6/11/2014)
crookj (6/11/2014)
Sean Lange (6/11/2014)
Ed Wagner (6/11/2014)
Revenant (6/11/2014)
eccentricDBA (6/10/2014)
TomThomson (6/10/2014)
sing4you (6/10/2014)
Stuart Davies (6/10/2014)
Sean Lange (6/10/2014)
Ed Wagner (6/10/2014)
Sean Lange (6/10/2014)
JAZZ Master (6/10/2014)
Bootsy Collins
Drink
Please!!!
Thanks
funkedelic
cool
bodacious
90's
80's Music
totally
Rad
Righteous
Bitchin'
June 11, 2014 at 8:16 am
Viewing 15 posts - 4,501 through 4,515 (of 15,381 total)