Home > Archive > Microsoft SQL Server forum > January 2006 > Advanced Data Shaping - Multiple Relate clause









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Advanced Data Shaping - Multiple Relate clause
doar123@gmail.com

2006-01-19, 3:24 am

Hello,

I'm using a shape query, but instead of using a simple clause "RELATE
field1 to field2" (relates the parent to the child), i wan't to use 2
relates. somthing like "RELATE field1 to field2 AND field3 to field4".

I want to receive in the children RS only the records who apply both
conditions.

How do i do that ?

Thanks !

Erland Sommarskog

2006-01-19, 3:24 am

(doar123@gmail.com) writes:
> I'm using a shape query, but instead of using a simple clause "RELATE
> field1 to field2" (relates the parent to the child), i wan't to use 2
> relates. somthing like "RELATE field1 to field2 AND field3 to field4".
>
> I want to receive in the children RS only the records who apply both
> conditions.
>
> How do i do that ?


I suspect that a newsgroup on ADO is better fitted for this question.

Or try Google. Entering SHAPE APPEND RELATE led me to
http://support.microsoft.com/default.aspx?scid=189657 which a
appears to have the answer you are looking for.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
ng

2006-01-20, 7:23 am

I havn't tryed. My idea: Create a field in the parent rs wich contains
both field1 and field2. For example:
Fieldx = cast(field1 as char(10)) + cast(field2 as char(10))
Do this in the child-rs, too and relate them with the Fieldx

Michael

www.zankl-it.de

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com