all groups > sql server programming > march 2005 >
You're in the

sql server programming

group:

Shape Command in SQL Server - Need to have more than one child set.



RE: Shape Command in SQL Server - Need to have more than one child set Alejandro Mesa
3/25/2005 6:23:03 AM
sql server programming: Peri,

SHAPE is not part of t-sql.


AMB


[quoted text, click to view]
Shape Command in SQL Server - Need to have more than one child set. Peri
3/25/2005 7:27:24 PM
Dear All,

There is a shape command in sql server with the following example

SHAPE {SELECT au_id, au_lname, au_fname FROM authors}
APPEND ({SELECT au_id, title FROM titleauthor TA, titles TS
WHERE TA.title_id = TS.title_id}
AS title_chap RELATE au_id TO au_id)

Can you please help me to add one more child set to this ?

Say:

strSh = " SHAPE {SELECT CurrencyCode FROM VDCurrency} AS VDCurrency " & _
" APPEND ({SELECT CurrencyCode, ZoneCode FROM VDCurrencyZone} AS
VDCurrencyZone " & _
" RELATE CurrencyCode TO CurrencyCode) AS VDCurrencyZone " & _
" APPEND ({SELECT CurrencyCode, ZoneCode, BucketCode FROM
VDCurrencyBucket} AS VDCurrencyBucket " & _
" RELATE ZoneCode TO ZoneCode) AS VDCurrencyBucket "

Table VDCurrency has CurrencyCode, Table VDCurrencyZone has CurrencyCode and
Zone Code and Table VDCurrencyBucket has CurrencyCode, Zone Code and Bucket
Code.

The code is working for (one child set only) :

strSh = " SHAPE {SELECT CurrencyCode FROM VDCurrency} AS VDCurrency " & _
" APPEND ({SELECT CurrencyCode, ZoneCode FROM VDCurrencyZone} AS
VDCurrencyZone " & _
" RELATE CurrencyCode TO CurrencyCode) AS VDCurrencyZone "

can anyone please help me out ?

Regards,

Peri


Re: Shape Command in SQL Server - Need to have more than one child set Peri
3/26/2005 6:24:25 AM
Thanks. Can you please help me out on how to achieve this ?

Regards,

Peri

[quoted text, click to view]

AddThis Social Bookmark Button