Viewing 15 posts - 2,131 through 2,145 (of 5,502 total)
Ok, then we'd need to add the namespace declaration (result as above).
Regarding your comment about the person sending you the file, here's what I'd say:
Whoever sent you that file should...
January 11, 2011 at 3:22 pm
Here's a short example to query data like you've posted (please note that I added a few end tags to change it into a valid xml structure as per SQL...
January 11, 2011 at 2:17 pm
dpalani (1/11/2011)
in the example i have said three columns, But i have more than 20 rows to be tranfered to column, And the data is huge. it will hit...
January 11, 2011 at 1:35 pm
It looks like a job for the CrossTab method.
Please see the related link in my signature.
January 11, 2011 at 7:08 am
pwalter83 (1/11/2011)
I really have no answer to your questions and am stuck with no option but to resign from my current position here.
I actually made a bad choice when...
January 11, 2011 at 5:14 am
Another method would be a CrossTab query.
For details please see the related link in my signature.
January 11, 2011 at 4:20 am
pwalter83 (1/11/2011)
Thanks a lot for your replies. One thing I forgot to mention is that this project is part of an SSIS package. If you are...
January 11, 2011 at 4:18 am
I still think it's better to use th additional column (as suggested before), maybe in combination with the exception table I mentioned.
But the main issue still remains: how tro identify...
January 11, 2011 at 4:12 am
The sample data you provided aren't XML data. Those are HTML data.
As per http://www.w3schools.com/Xml/xml_whatis.asp
XML is not a replacement for HTML.
XML and HTML were designed with different goals:
...
January 10, 2011 at 4:06 pm
Change your heavy WHERE clause to
INNER JOIN Categories_Products_Link
ON p.ProductID = Categories_Products_Link.ProductID
WHERE
Categories_Products_Link.CategoryID IN (21,219,...)
I'd also recommend to consider using an additional table to hold those numerous numbers if those...
January 10, 2011 at 3:49 pm
Here's a test scenario showing that your code should work.
Beside the table name, what's different on your end?
DECLARE @tbl TABLE
(
ID INT,R_DATE DATETIME, SHRNCRS_NCST_CODE CHAR(2)
)
INSERT INTO @tbl
SELECT...
January 10, 2011 at 3:31 pm
Paul,
I'm not sure if I completely understood the logic behind your CASE statements. But to me it looks like you could add a (persisted) computed column to your DHL_TRADE_ASSIGNMENT table...
January 10, 2011 at 3:26 pm
Strange. Should work. Is this the full query you posted?
January 10, 2011 at 2:58 pm
Wouldn't the following return the same result?
;WITH cte AS
(
SELECT
ID,
R_DATE,
CATEGORY,
ROW_NUMBER() OVER (PARTITION BY SHRNCRS_NCST_CODEORDER BY R_DATE DESC) Rno
FROM STABLE
WHERE SHRNCRS_NCST_CODE IN('CC', 'MB')
)
SELECT *
FROM cte
WHERE Rno=1
January 10, 2011 at 12:58 pm
You could either use a subquery with MAX() and GROUP BY or change the PARTITION BY part in your ROW_NUMBER subquery and use it directly against your source table.
As a...
January 10, 2011 at 11:56 am
Viewing 15 posts - 2,131 through 2,145 (of 5,502 total)