Tag Info

New answers tagged

0

As far as i have been able to read/research it seems that the answer is no. However i have found that I can merge 2 datasets to achieve what I wanted to do.


1

Two good discussions can be found here and here. XML pros Export and transfer Flexible "application or data source is robust even if the data schema changes. XML enables your application to be extensible because you access the XML-formatted data by using element and attribute names instead of offsets" RDBMS pros Indexing Integrity and other constraints ...


1

I use XML when I need more flexible structure than a database table can offer. When you have data that you do not know exactly the structure beforehand, it could be profitable to store it as XML. You can store such XML in a relational database field, as many e-learning systems do. In fact e-learning course structure is a good example because individual ...


0

I have found the solution to my problem. My "server name" part of the sproc was being loaded from a column in the database which included the port number (because it is a named instance), therefore it read [Servername\Instance,Port].[database].... but when I removed the port it worked. Demonstration below. USE [master] GO CREATE DATABASE TestDatabase go ...


2

It's not supported, but you can get around it.. select * from openquery( LinkedServerName, 'exec [database].dbo.sproc @Id=@Id, @PItems=@PItems output'','' @PId bigint, @PItems xml output'', valueOf@PId, valueOf@PItems output' ) There ...


0

You should use the nodes() method of the XML data type to shred your XML. If I understand you correctly you want to fetch the nodes from the root node where the attribute type is line and from that node you want the nodes where the attribute type is 'item'. I will just assume that the XML you have provided with numeric node names is not the actual XML you ...


0

Is there any way the XML can be better formed (I understand this isn't always possible)? I've never come across dynamic element names before, and while that certainly doesn't mean it can't be done, it's much more difficult. However, if you're able to get some static items in your XML, it makes it much easier to deal with. If the XML was stored in a similar ...


-1

As i understand you need the XML upload option which customized but not hard coded one you need. SELECT * FROM T UPDATE T SET XmlCol =( SELECT * FROM OPENROWSET( BULK 'C:\SampleFolder\SampleData3.txt', SINGLE_BLOB ) AS x ) WHERE IntCol = 1; GO The answer is available in MSDN, Please refer the below link MSDN Article


1

You may improve your performance by using xml exist, instead of extracting the values. SELECT playId from plays where PlayFieldValues.exist('/PlayAttributes/PlayFields/PlayField[@ID = "Play.GenericInt1" and text()="25"]')=1 ...but without any xml indexes this is still going to involve a table scan.


1

If you still need to export the file and send it as an attachment, this can also be fully automated in SQL Server. Exporting as a CSV can be achieved via BCP. There's more details in this answer, but the main idea is: bcp "SELECT Col1,Col2,Col3 FROM MyDatabase.dbo.MyTable" queryout "D:\MyTable.csv" -c -t , -S SERVERNAME -T You would then attach the file ...


1

Yes you can send the report via HTML format, for example as listed in MS: Scenario: This example sends an e-mail message to Dan Wilson using the e-mail address danw@Adventure-Works.com. The message has the subject Work Order List, and contains an HTML document that shows the work orders with a DueDate less than two days after April 30, 2004. Database Mail ...



Top 50 recent answers are included