Viewing 15 posts - 3,781 through 3,795 (of 5,504 total)
David Webb-200187 (4/15/2010)
April 15, 2010 at 2:01 pm
Even if I'm not Jeff ( 😀 ) but promoting his great articles because those are simply the best ones I found related to this subject, I'd use ROW_NUMBER() to...
April 15, 2010 at 1:42 pm
and here we go:
Short explanation:
a CTE (aka CommonTableExpression) is similar to a subquery, but just easier to read.
It can also be used to do some recursive joins. For details please...
April 15, 2010 at 1:32 pm
gregory.anderson (4/15/2010)
April 15, 2010 at 1:17 pm
First: Glad you like the solution (so far) 😀
Second: Sorry that I left yesterday without any further motice... It was 1am over here so I decided to take a nap...
April 15, 2010 at 11:31 am
What "user" does that say?
Are you sure you're talking about a SQL Server issue?
Please post sample data and what you're actually trying to do.
Sounds more like a front end issue...
April 14, 2010 at 5:06 pm
What's the result of SELECT @@VERSION ?
If it's less than something like "Microsoft SQL Server 2005 - 9. ..."
then you're absolutely right. CTE's are not supported below SS2K5.
April 14, 2010 at 5:05 pm
You might want to have a look at the CrossTab and DynamicCrossTab articles referenced in my signature.
The former will show you an example on how to build pivoted data with...
April 14, 2010 at 5:02 pm
Maybe this link will be of some help, too:
http://www.sqlservercentral.com/Forums/Topic679572-338-2.aspx
Barry did a great job explaining how the STUFF ... FOR XML PATH actually works.
April 14, 2010 at 4:54 pm
Edit: quote removed...
Did you try to put the semicolon right in front of the WITH keyword?
I can't see anything wrong at all with the query as it is posted. What...
April 14, 2010 at 4:47 pm
Ok,
here's part 1. It should cover everything except the handling of (@PermitType = 'M')
I expect you have a test environment so you can verify if it will return the same...
April 14, 2010 at 4:23 pm
gregory.anderson (4/14/2010)
Data type mismatch: [PermitNo] [int] vs. [PermitNumber] [varchar](6)
I did this because the previous conversion to get to the mainframe/VSAM version caused some bad data to be created. There are...
April 14, 2010 at 2:28 pm
gregory.anderson (4/14/2010)
Let's see how this works:
bad sample data
Don't remember how much I pasted before, but this is everything up until the first "Select Top 1" statement
Well, this way of posting...
April 14, 2010 at 2:17 pm
Ok,
here's what I found so far:
Data type mismatch: [PermitNo] [int] vs. [PermitNumber] [varchar](6)
Data type for @PermitType_Org, @PermitType_Ind, @PermitType_Temp, @PermitType_Sticker?
Any constraint on [Status] [varchar](2) to ensure 'RP','' or numeric values?
This...
April 14, 2010 at 1:46 pm
Viewing 15 posts - 3,781 through 3,795 (of 5,504 total)