Viewing 15 posts - 8,956 through 8,970 (of 15,381 total)
You're welcome. Glad that helped.
March 25, 2013 at 7:53 am
I can help you get rid of this cursor. It seems that all you actually need is to read up on the output clause. From the original code you posted...
March 25, 2013 at 7:51 am
Select statements usually come from tables. The pictures don't do much.
March 22, 2013 at 2:43 pm
julesbenone (3/22/2013)
Sean Lange (3/22/2013)
;with StateData as
(
select t1.*, ROW_NUMBER() over(partition by t1.STATE order by t1.city) as RowNum
from...
March 22, 2013 at 1:40 pm
I understand the challenges here but why in the world do you have a table with SSN in them like this? This type of thing should not be in your...
March 22, 2013 at 12:56 pm
Ed Wagner (3/22/2013)
For #2, Sean Lange posted this great approach earlier today for a similar request:
with EconSearch(SomeValue) as
(
select 'D.01.01.01' union...
March 22, 2013 at 12:36 pm
Yes splitting your parameter is the way to go here. All of these can easily be done using Jeff's splitter. You can find it by following the link in my...
March 22, 2013 at 12:34 pm
rehook2003 (3/22/2013)
I originally started with a sub query, but without success changed to the left join... I see now why it was failing.
Sean, Thanks for your help...
March 22, 2013 at 12:28 pm
Since you just want a grid solution maybe something like this would work?
;with StateData as
(
select t1.*, ROW_NUMBER() over(partition by t1.STATE order by t1.city) as RowNum
from #tempCityState t1
join #tempCityState...
March 22, 2013 at 12:24 pm
Make sure you don't just blindly find that function and use it. You need to read that article and understand what it is doing!!!
March 22, 2013 at 11:04 am
Cool. Sounds like you don't need the cross tab stuff at all. đ
The following will produce the results you are looking for.
;with EconSearch(SomeValue) as
(
select 'D.01.01.01' union all
select 'D.01.01.02' union all
select...
March 22, 2013 at 11:03 am
Excellent Rick. That is exactly what we are looking for!!!
The reason your date column was null is because you did a left join but filtered the row out with the...
March 22, 2013 at 10:58 am
davdam8 (3/22/2013)
Based on this query and this example (http://www.sqlservercentral.com/Forums/Topic1416551-391-1.aspx), which only retrieves only four levels:
With MySampleData (AllLevels)
AS
(
SELECT 'Analysis»Letters»Numbers»Detail' UNION ALL
SELECT 'Description»Letters»Numbers»Detail' UNION ALL
SELECT 'Planning»Letters»Symbols»Detail'
)
SELECT...
March 22, 2013 at 10:39 am
Sam S Kolli (3/22/2013)
March 22, 2013 at 10:32 am
rootfixxxer (3/22/2013)
@sean-2 Lange
I know the nullif, but to use that function i need to write every column... :crazy:
@steve-2 Jones - SSC Editor
I'll create some sample data... The original table it's...
March 22, 2013 at 10:29 am
Viewing 15 posts - 8,956 through 8,970 (of 15,381 total)