?
Solved

For XML/SP

Posted on 2007-03-30
4
Medium Priority
?
209 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 1000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

777 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