473,387 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Syntax for storing query results from one server to another server

19
Can someone help me?
I'm executing a stored procedure that runs a query. That works fine.
I need the syntax to tell the stored procedure to save it to another server in a folder. Any help would be much appreciated.

Thanks in advance.
Jun 14 '07 #1
5 1251
Purple
404 Expert 256MB
Hi kbaisch,

Can you post the stored procedure so we can see what you are doing

Regards Purple
Jun 14 '07 #2
kbaisch
19
this is the stored procedure I have to run the query on the deh05 server. Now i need to send this information to a folder in my deh02 server.


/*
Name: Testmovetofolders
Description: Move queries to folders on deh02
Author: Kim Baisch
Modification Log:

Description Date Changed By
Created procedure 06/14/07
*/


CREATE PROCEDURE .[Testmovetofolders] AS
SELECT TOP 100 PERCENT dbo.Medicaid_cur.Name_, dbo.Medicaid_cur.Sex_, dbo.Medicaid_cur.DOB_, dbo.Medicaid_cur.Residence_,
dbo.Medicaid_cur.Case#_, dbo.Medicaid_cur.Race_, dbo.Medicaid_cur.Elg_, dbo.Medicaid_cur.Sub_, dbo.Medicaid_cur.EligBegin_,
dbo.Medicaid_cur.EligEnd_, dbo.Medicaid_cur.SSN_, dbo.Medicaid_cur.Stat_, dbo.Medicaid_cur.EligMax_, dbo.Medicaid_cur.CurMth_,
dbo.Medicaid_cur.TPLCode_
FROM dbo.Medicaid_cur INNER JOIN
dbo.VIEW1_3TABLES ON dbo.Medicaid_cur.Residence_ = dbo.VIEW1_3TABLES.MRCityState_ID
WHERE (dbo.VIEW1_3TABLES.AreaName = N'ANMC BUSINESS OFFICE')
GO
Jun 14 '07 #3
Purple
404 Expert 256MB
Hi kbaisch,

connect to your remote server and run the create procedure SQL statement as posted previously which will create the stored procedure.

Post back if you need clarification

Regards Purple
Jun 14 '07 #4
kbaisch
19
I'm sorry, I'm not very good at explaining. I'll try again....

I want to add more script to this procedure telling it to save this as a "certain file" ie, xls, doc, etc. and telling it where to save it on a server in a folder. I don't know how to write that. Can you help me with that?

Thank you for your help.
Jun 14 '07 #5
Hi I think you must use User-Define functions with clr integrations to do this
Jun 15 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: maceo | last post by:
I have some code that extracts the data from a table and performs a calculation (total time) on one of the columns. Here is the code: <?php /* Database connection */
5
by: Ken Halley | last post by:
How does one refer to a variable name using a variable within a variable name??? For example, I want to perform a SQL query and use the results of the query to determine which variable to assign a...
29
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
4
by: Robert | last post by:
What is the syntax to use in a VBA script to execute a pass-through? Thanx
1
by: Jeff | last post by:
I am getting Unable to find operator in query string. Query string currently is INSERT INTO Results (Name,Email,Comments,File) VALUES ('::Name::','::Email::','::Comments::','::File::') Here...
6
by: Kieran Benton | last post by:
Hi, I have quite a lot of metadata in a WinForms app that I'm currently storing within a hashtable, which is fine as long as I know the unique ID of the track (Im storing info on media files). Up...
24
by: clare at snyder.on.ca | last post by:
I have a SQL query I need to design to select name and email addresses for policies that are due and not renewed in a given time period. The problem is, the database keeps the information for every...
12
by: Brad Baker | last post by:
I am trying to write a simple ASP.net/C# page which allows users to select some values and produce a report based on a SQL query. I have a self posting dropdown form which allows users to select...
0
by: Matchkwik | last post by:
Hi all, I am new to programming....but here goes. I am using ASP, SQL Server 2000 database on a shared server environment & IIS 6.0. I have a table called USER_SEARCH, within that table is a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.