Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ticatac
Starting Member
6 Posts |
Posted - 2002-11-21 : 04:35:49
|
I'm new to data shaping and I'm trying to get a parent-child relationship from one set of data to enable me to display it in a report without repeating the parent information.I'm using MS SQL server stored procedures to return the recordset and I'm having a few teething problems.1. I can run the stored procedure using purely the shape command but am having difficulty passing in a variable that contains the parameters needed for the query itself. If I just type the parameters it works fine.2. I can return the parent records using the SHAPE and COMPUTE commands, see below, but am not sure how to proceed with getting the child records. .CommandText = "SHAPE {{call dbo.spRptMaintenance _ ('ABC,DEF') }} AS RegGroup, SELECT * FROM RegGroup " & _ "COMPUTE RegGroup BY Registration"I have read a few knowledge base and help articles about data shaping but am unsure how to proceed, everything I've tried up to now seems to result in a syntax error.Thanks in advance to anyone who can help. |
|
smccreadie
Aged Yak Warrior
505 Posts |
Posted - 2002-11-21 : 22:12:03
|
It looks like you're using VB. There is a knowledgebase article from MS about how to pass in parameters like this. I believe that you use ? as a placeholder. Try searching MS for shape and parameter and see if you can find the article. |
 |
|
|
|
|