Data Shaping question (newbie)

Results 1 to 2 of 2

Thread: Data Shaping question (newbie)

  1. #1
    Join Date
    Dec 1969

    Default Data Shaping question (newbie)

    Hello, all... I&#039;m using the datashaping SQL at the bottom and it works great... my question is, how do I limit the records returned in the "shaped" column... e.g., if I want only four records returned in the shaped column, like this:<BR><BR>record 1-------------shaped data 14<BR>---------------------shaped data 22<BR>---------------------shaped data 38<BR>---------------------shaped data 40<BR><BR>record 2-------------shaped data 16<BR>---------------------shaped data 34<BR>---------------------shaped data 22<BR>---------------------shaped data 4<BR><BR>etc. etc. etc.<BR><BR>I tried "Select TOP..." but it returned only the top four records in the recordset, not the top four for EACH assoc. record in the main recordset... hope that makes sense.<BR><BR>HERE&#039;s the SQL<BR><BR>&#060;%<BR>Dim DataShapeSQL<BR>DataShapeSQL = "SHAPE {SELECT * FROM organizations}"<BR>DataShapeSQL = DataShapeSQL & "APPEND ({SELECT * FROM individuals}"<BR>DataShapeSQL = DataShapeSQL & "RELATE OrgID TO OrgID) AS rsOrg_Link"<BR>set rsOrg = Server.CreateObject("ADODB.Recordset")<BR>rsOrg.Op en DataShapeSQL, MM_connOLEDB_TCubed_STRING<BR>%&#062; <BR><BR>THANKS

  2. #2
    Join Date
    Dec 1969

    Default RE: Data Shaping question (newbie)

    I don&#039;t see in your SQL where you have tried using the TOP 4 restriction. But have you tried the following:<BR><BR>DataShapeSQL = "SHAPE {SELECT * FROM organizations}"<BR>& "APPEND ({SELECT TOP 4 Individuals.* FROM individuals}"<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts