Viewing 15 posts - 1,486 through 1,500 (of 1,957 total)
konstantinos.christodoulakis (2/15/2011)
Jeff Moden (2/14/2011)
Why not validate and mark all the failures at once using set based SQL? Then you could actually create a...
February 15, 2011 at 7:33 am
Is this the final requirement or will there be more after this (for example - you have specifically picked out Savings account - will that always be true?)
February 15, 2011 at 2:43 am
Kev,
Your table def for Person that you posted had Gender as CHAR(1) - should you be using 'M' and 'F' instead of Male and Female?
February 14, 2011 at 6:19 pm
Jeff, I don't think another article is needed - Jacob Sebastian has already written a fantastic series of articles available here on SSC called XML Workshop - they range from...
February 14, 2011 at 4:14 am
Hmmm it is a bit of a problem you have there, and the only thing left in my kit bag tonight is this - feel free to ignore it as...
February 13, 2011 at 5:17 pm
I may have an idea but I need to check on my syntax - it's late ! back in a bit.
February 13, 2011 at 4:41 pm
There is... but why are you opposed to just returning the dataset containing the problem subprojects?
February 13, 2011 at 4:10 pm
I would recommend reading CELKO's post about table design...
Having said that, if you are not able to change database design at this time (let's face it - who can once...
February 13, 2011 at 3:48 pm
Let me re-phrase the question.
If one project has ten subprojects and two subprojects have a null start date do you:
(pick one please)
1) Raise one error
2) Raise one error per subproject...
February 13, 2011 at 3:35 pm
Do you want to validate every subproject for the @ProjectID?
Or are you just interested if there EXISTS (hint) at least one subproject with a null start date?
February 13, 2011 at 3:23 pm
Jeff, you gotta learn some XML !
p.gauci, declare the namespace explicitly and then use it to reference the nodes b and c....
;with xmlnamespaces( 'b' as ns_b )
select nd.value('(./text())[1]','varchar(20)')
from @xml.nodes('/a/ns_b:b/ns_b:c') x(nd)
Note...
February 13, 2011 at 3:14 pm
Ian Scarlett (2/13/2011)
mister.magoo (2/12/2011)
This interested me, so I wrote a TVF for itOnly one word to describe your solution mistermagoo... Elegant
I like it.
I am not sure it is that elegant,...
February 13, 2011 at 8:51 am
This interested me, so I wrote a TVF for it....(single language though)
CREATE FUNCTION OrdinalDateSuffix( @InputDate DATETIME )
RETURNS TABLE
AS
RETURN ( WITH special(DAY,suffix)
AS
(
SELECT1,'st' UNION ALL
SELECT2,'nd' UNION ALL
SELECT3,'rd' UNION ALL
SELECT21,'st' UNION ALL
SELECT22,'nd' UNION...
February 12, 2011 at 7:08 pm
Hi,
Please also consider using the XML datatype instead of XmlDocuments - it is much easier to work with and faster!
Here is your select reworked to use an XMl datatype.
Also,...
February 12, 2011 at 6:18 pm
Please may I ask - what is the purpose of this request ?
Also, how is this going to help if there are more than a few records?
e.g. Lutz' fine answer...
February 12, 2011 at 6:03 pm
Viewing 15 posts - 1,486 through 1,500 (of 1,957 total)