Solved

For XML/SP

Posted on 2007-03-30
4
198 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
  • 2
  • 2
4 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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
Comment Utility
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 142

Accepted Solution

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

Author Comment

by:adraughn
Comment Utility
gracias
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now