Viewing 15 posts - 2,941 through 2,955 (of 5,504 total)
Steve Jones - Editor (8/26/2010)
And for those of you looking for a humorous diversion: http://bit.ly/bSaC3q
Ummm, Jeff... gotta ask a rather stupid question:
Does "One Orange Chip" relates to Roulette or is...
August 26, 2010 at 2:52 pm
Why do you have to use VB? Pass the path of your xml file to a stored procedure and let SQL Server do the mapping.
But if you really want to...
August 26, 2010 at 2:40 pm
I don't think you'd need the DISTINCT in your NOT IN clause. It won't matter anyway if there'd be more than one row returned per id. This would eliminate a...
August 26, 2010 at 2:28 pm
You define an XML parameter in your sproc and send your parameter list as a valid xml string.
In the sproc you transform the xml data into either a relational table...
August 26, 2010 at 2:16 pm
CirquedeSQLeil (8/26/2010)
Should I stay or should I go now?
If you go there will be trouble. Anβ if you stay it will be double.
So, in order to minimize trouble: RUN, Jason,...
August 26, 2010 at 1:56 pm
Something like the following code?
(Side note: untested due to the lack of ready to use sample data)
SELECT Part,DATEDIFF(dd,MAX(DATE),'20100810') AS age
FROM Inv_Warehouse
WHERE Status IN('InHouse', 'Delivered', 'Returned')
GROUP BY Part
August 26, 2010 at 1:36 pm
Not if you also need to know the value of the AppId attribute and not as long as your pkg nodes are not nested within a root node.
If you don't...
August 26, 2010 at 1:22 pm
Please have a look at the CrossTab article referenced in my signature for an alternative way.
The CrossTab method will also make it a lot easier to return dynamic yearmonth columns...
August 26, 2010 at 1:16 pm
Let's assume you have the file stored as c:\Temp\SSC.txt.
Then you could use the following code (assuming you'd like to store the data in a xml column):
/*
CREATE TABLE T (IntCol int,...
August 26, 2010 at 1:12 pm
Here's an example of what I think Wayne is talking about:
DECLARE @xml XML
SET @xml=
'<requests AppId="1">
<pkg attribute1="a" attribute2="w"/>
<pkg attribute1="b" attribute2="x"/>
<pkg attribute1="c" attribute2="y"/>
<pkg attribute1="d" attribute2="z"/>
</requests>'
/*-- or, alternatively
SET @xml=
'<pkg attribute1="a" attribute2="w" AppId="2"/>
<pkg attribute1="b"...
August 26, 2010 at 12:52 pm
@mike-2: The quirky update method should not be used on joined tables. See Jeff's revised article[/url] for details.
Other than that: as just confirmed the target system is SS2K5. No need...
August 25, 2010 at 9:24 am
Now it starts to get confusing...
You posted in a SS2K forum.
When Jeff mentioned it regarding Mike's solution you didn't reply to clarify.
And now you're posting a query that won't work...
August 25, 2010 at 6:29 am
Jeff Moden (8/24/2010)
... I could take a look at it.
So would do others (like me) π
We might be able to find a solution without using joined tables when performing the...
August 25, 2010 at 5:29 am
Why don't you use the "old-fashioned" CASE statement?
SELECT
SiteID,
ServDate,
SUM(CASE WHEN Meal=1 THEN FreeCnt ELSE 0 END) as Meal1FreeCnt,
SUM(CASE WHEN Meal=1 THEN Reduced ELSE 0 END) as Meal1Reduced,
SUM(CASE WHEN Meal=1...
August 24, 2010 at 5:11 am
@@ROWCOUNT will return the affected rows based on the statement before @@ROWCOUNT.
You don't have to look for batch terminator.
Other than that, yes, you'd have to look for each statement where...
August 23, 2010 at 3:50 am
Viewing 15 posts - 2,941 through 2,955 (of 5,504 total)