Viewing 15 posts - 5,401 through 5,415 (of 5,503 total)
It looks like your database is configured to be case sensitive. meaning the database is using a case sensitive collation.
Your query should work if you change your SELECT and ORDER...
May 1, 2009 at 6:12 am
reggae_blur (4/30/2009)
Cool. Thanks for that.
I'm glad it finally worked. Again, sorry for the mass...
reggae_blur (4/30/2009)
Btw, the BCP that you gave me, should I run it in SQL QA? 😀
No.
The...
May 1, 2009 at 2:11 am
Hi,
I'm really sorry to mess up that badly with the last two approaches. :crazy: :blush:
Final approach:
Attached please find a bcp script that copies out your data in the desired format...
April 30, 2009 at 5:35 pm
Hi,
I'm using FireFox 2.0.0.9.
The following post http://www.sqlservercentral.com/Forums/FindPost707540.aspx dos not show any XML data.
However, Flo came up with a nice solution: see http://www.sqlservercentral.com/Forums/FindPost707572.aspx
(upgrade to FireFox 3 is not required...)
April 30, 2009 at 5:51 am
kavitus (4/30/2009)
Any good resources of starting with XQuery
I found the following article very helpful:
http://www.simple-talk.com/sql/t-sql-programming/xml-jumpstart-workbench/
@Flo:
The "quote-trick" works on my FireFox-Version, too... :w00t:
April 30, 2009 at 5:45 am
Florian Reischl (4/30/2009)
Your XML is not valid.
* XML is case sensitive
* Start element "record" and end element "RECORD"
* Start element "deptid" and end element "DEPT"
* Start element "DEPTID" and end...
April 30, 2009 at 5:06 am
Instead of using OpenXML you should look into XQuery.
If you have trouble getting XQuery to work, please attach the XML file together with what you've tried and we probably can...
April 30, 2009 at 4:46 am
Hi,
I spent some more time on the issue.
Here's a solution that should work with SS2K:
SELECT TOP 15
BookType.type,
(SELECT
Author.au_fname,
Author.au_lname,
Author.phone,
Author.address,
Author.city,
(Select
BooksByAuthor.title_id,
BooksByAuthor.title,
BooksByAuthor.price
FROM titleauthor t1
INNERJOIN @titles BooksByAuthor
ON t1.title_id = BooksByAuthor.title_id
WHERE t1.au_id = Author.au_id
AND BooksByAuthor.type...
April 29, 2009 at 2:28 pm
Alternative to GSquared's solution you also can directly select the values (without the .query('.') part):
--based on GSquared's solution in previous post
select Photos.Photo.value('(@path)[1]','varchar(100)') as PhotoPath
from @XML.nodes('(jpgrotator/photos/photo)') Photos(Photo)
April 29, 2009 at 10:24 am
AFAIK it stand for Original Poster (the one who started the thread with the first post).
April 29, 2009 at 10:12 am
saurabh.dwivedy (4/29/2009)
Just wanted to mention a small point here: Your code assumes that the starting position will always be 1. What happens if the match string were to be somewhere...
April 29, 2009 at 9:55 am
Unfortunately, the data you provided cannot be used right away, since I don't have a database "pubs" nor the tables you referred to.
It took me a moment to reformat your...
April 29, 2009 at 2:03 am
Hi,
like Gail already stated, normalization of the table would solve the issue in general by using "the easy way"... 🙂
Your database design has the following "disadvantages": Where do you store...
April 28, 2009 at 4:17 pm
Please post sample data as stated in my post above (table definition, sample data ready to insert and expected output).
April 28, 2009 at 6:51 am
Maybe the following article will help you (Google search string: "SQL 2000 FOR XML"):
http://www.databasejournal.com/features/mssql/article.php/2196461/XML-and-SQL-2000-Part-1.htm
If you need a more detailed explanation you should provide more detailed information as well.
For help on...
April 28, 2009 at 5:15 am
Viewing 15 posts - 5,401 through 5,415 (of 5,503 total)