Showing posts with label queryin. Show all posts
Showing posts with label queryin. Show all posts

Monday, March 19, 2012

how to get sql output in an XML file?

Hello
i have one query
In Query Analyzer i executeed sql query like "Select * from tmp"
this retrives 10 records now i want to save these 10 record into XML file on
my specified location
Is it possible in single SQL command to save retrived data into XML file at
specified location
Regards
Ashish
You can save the output of a query in QA using the
Query--> Results to file option.
You can get the output of a query in XML using the FOR XML clause
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Ashish Deshpande" <Ashish Deshpande@.discussions.microsoft.com> wrote in
message news:5CCE3835-43D8-4901-85D6-D09976510AF5@.microsoft.com...
> Hello
> i have one query
> In Query Analyzer i executeed sql query like "Select * from tmp"
> this retrives 10 records now i want to save these 10 record into XML file
> on
> my specified location
> Is it possible in single SQL command to save retrived data into XML file
> at
> specified location
> Regards
> Ashish
|||Hi
You can create XML with the FOR XML option in SELECT statements. If you want
to save the data to a file, look at DTS as SQL Server does not do user file
handling itself.
Regards
Mike
"Ashish Deshpande" wrote:

> Hello
> i have one query
> In Query Analyzer i executeed sql query like "Select * from tmp"
> this retrives 10 records now i want to save these 10 record into XML file on
> my specified location
> Is it possible in single SQL command to save retrived data into XML file at
> specified location
> Regards
> Ashish

Friday, March 9, 2012

How to get query execution time of an MS SQL Query in Visual basic

please let me know How to get query execution time of an MS SQL Query
in Visual basic
If you are executing the query from vba, create a timer (using
GetTickcount from the Windows API or something similar). Record the
start time at the beginning of the query, and the stop time after it
completes. Compute the total time elapsed.
--Mary
On 14 Sep 2004 23:46:21 -0700, rajeevmc@.yahoo.com (Rajeev M C) wrote:

>please let me know How to get query execution time of an MS SQL Query
>in Visual basic