Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
|
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 18th, 2004, 05:01 PM
Registered User
 
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Data Shaping Problem .. im stuck!

I cant figure out what im doing wrong... the tables are related, and the parent
and child sort fine, but the grandchild recordset repeats itself for each
iteration. Can anyone help me? Ive been stuck for a while :(



 dbo.Section
 -Section_No

 dbo.Subsection
 -Section_No
 -SubSection_No

 dbo.Heading
 -Section_No
 -Subsection_No
 -Heading_No

 QUERY
 SQL = "SHAPE { SELECT * FROM dbo.Section ORDER BY Section_No } "
 SQL = SQL + "APPEND(( Shape {SELECT * FROM dbo.Sub_Section ORDER BY
SubSection_No } AS rsSubSections"
 SQL = SQL + " APPEND({SELECT * FROM Heading ORDER BY Heading_No} AS rsHeadings
"
 SQL = SQL + " Relate subSection_No to subSection_No)) "
 SQL = SQL + " RELATE Section_No to section_No )"

 RESULTS
 Section 1
   Subsection 01 Raw Material and Packaging Specifications
        Heading 1 Plant Requirements
        Heading 1 Bags
        Heading 1 Procedures
        Heading 3 Plant Audits - AIB
        Heading 4 Purchased Flour Specs - Go to DBC QA31

 Section 2
   Subsection 02 Operating Procedures
        Heading 1 Plant Requirements
        Heading 1 Bags
        Heading 1 Procedures
        Heading 3 Plant Audits - AIB
        Heading 4 Purchased Flour Specs - Go to DBC QA31


 
Old March 19th, 2004, 04:52 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Are you certain your tables are constructed correctly with the correct relationships?

--

Joe
 
Old March 19th, 2004, 11:09 AM
Registered User
 
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

this is my db

http://techmix.net/rel.gif






Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Shaping Connection String mat41 Classic ASP Professional 4 August 6th, 2008 02:19 AM
Im trying to insert data into mysql using jsp paulhamo SQL Language 1 September 12th, 2006 02:35 AM
I've downloaded Jakarta-tomcat-5.5.9, now Im stuck xena BOOK: Professional Apache Tomcat 0 October 13th, 2005 08:05 AM
data shaping... slooooow results page pshudgins Classic ASP Databases 0 June 23rd, 2005 02:01 PM
Data Shaping In SQL Server 2000 nidgep SQL Server ASP 5 August 29th, 2003 03:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.