Viewing 15 posts - 5,296 through 5,310 (of 5,504 total)
Hi,
I just used your question "determine the number of business days between two dates" and searched for exactly the same string on this site (search function on the upper right...
June 12, 2009 at 10:21 am
Glad I could help!
If you have any future issues regarding SQL Server get back to this forum.
Considering the way you've provided the sample data I'm sure you'll get a real...
June 12, 2009 at 9:11 am
Assuming you're running on SS2K5 (since posted in 2K5 forum), you should look into XQuery instead of openxml.
Example:
DECLARE @XMLDOC xml
SET @XMLDOC = N'
...
June 12, 2009 at 8:39 am
Hi Phil,
Change SELECT
p.ProductId,
p.ProductDescription,
i.LotNumber,
STR(@Qty,5,2) AS Qty,
l.LocationId AS DefaultLocation
FROM GoodsReceipts AS gr
to
SELECT
p.ProductId,
...
June 12, 2009 at 5:14 am
Please don't cross post!
It won't reduce the time until you get an answer but it might split or double answers.
Further discussion please on thread http://www.sqlservercentral.com/Forums/FindPost733638.aspx
June 12, 2009 at 4:09 am
Please provide table structure, sample data and expected result set based on the sample as described in the link in my signature.
Reason: It looks like you don't need the cross...
June 12, 2009 at 3:24 am
Hi Jeff,
the reason is that you''re trying to get the "sister elements" of csymbol (meaning the elements at the same hierarchy). Instead of querying the csysmbol element you should use...
June 11, 2009 at 3:19 pm
If I understand you correctly your data(=elements) "disappear" from the xml structure if the value is null.
There are two options I know of how to deal with it:
1) You can...
June 11, 2009 at 1:26 pm
You're welcome!
Glad it finally worked out for you.
As you could see: the more easy it is to work on your code the easier (and faster) you'll get an answer.
June 11, 2009 at 1:02 pm
You just need to add the ProductID to the SELECT statement as well as the GROUP BY clause:
SELECT
DATEPART(YEAR,I.EffectiveDate) AS Production_Year,
DATENAME(MONTH,I.EffectiveDate) AS Production_Month,
P.ProductId,
COUNT (P.ProductId) AS Units_Built,
AVG(I.MaterialValue) AS AvgMaterialCost,
AVG(I.LabourValue) AS...
June 11, 2009 at 12:20 pm
The post hasn't been moved.
You might have picked the wrong post when you replied. Never mind. I'm going to add a reference from the other post to this one.
The only...
June 11, 2009 at 11:18 am
Hi,
I typed "Product level is insufficient" into Google search and got the following link as the first hit. It should help.
June 11, 2009 at 9:22 am
Hi Phil,
even though we change the thread, the subject is still the same... (for those that might want to look into the "old" story: http://www.sqlservercentral.com/Forums/FindPost732338.aspx
With one BIG difference: your sample...
June 11, 2009 at 7:48 am
Your example shows the final result after importing the xml structure.
You don't really need the xsd for that...
So, the result set does not really have to do with...
June 11, 2009 at 4:00 am
Hi,
just change your line
RTRIM(NewTable.LOOKUPS.value('Unit[1]','VARCHAR(20)')) As 'Unit',
to
RTRIM(NewTable.LOOKUPS.value('../Unit[1]','VARCHAR(20)')) As 'Unit',
Reason: Your trying to include an element of the previous level. So you have to "climb up" the same way as you...
June 11, 2009 at 3:34 am
Viewing 15 posts - 5,296 through 5,310 (of 5,504 total)