Solved

For XML/SP

Posted on 2007-03-30
4
205 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 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 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