Solved

For XML/SP

Posted on 2007-03-30
4
208 Views
Last Modified: 2010-03-19
SQL 2k5

Is it possible to use For XML on a stored procedure that has a parameter?

adria
0
Comment
Question by:adraughn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18823695
it is not clear what the parameter has to do with the FOR XML part, can you specify, please
0
 
LVL 13

Author Comment

by:adraughn
ID: 18823815
i have a select statement that i am passing to sql for an asp page. it is currently bringing in the query results as the data source for the page and then the user filters it. then we have to format it by creating multiple "tables" on the page.

i want to change the sql to reference the stored procedure that has a parameter of Job Number. But I would also like to use the For XML in the SP, but was not sure if it could be used with a parameter.

adria
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 18823838
yes, you can use parameters in a stored procedure for a query that specifies FOR XML.
0
 
LVL 13

Author Comment

by:adraughn
ID: 18824009
gracias
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question