Solved

For XML/SP

Posted on 2007-03-30
4
203 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]
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 142

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql calculate reminders 11 73
Bubble user-defined Sql RAISERROR(...) to c# exception 14 168
Can Unique column have more than one Null? 8 53
Unable to save view in SSMS 21 69
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

773 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