|
Archives of the TeradataForumMessage Posted: Tue, 01 Jul 2003 @ 10:22:23 GMT
My mistake, I was thinking off the top of my head when typing the mail (which is syntactically incorrect - just like some of the manual examples!) Looking back at the documentation sent out when we hit this issue, the recommendation was that SAMPLE should only be used for getting back example rows with no other conditions. As you rightly state, volatile/temp tables are the only way around this and have the advantage of solving the RI problems that a straight sample causes. So in my example, the subquery is replaced by a select from the temp table. The PI driving of sample is still valid though. You cannot seem to do this at all using derived tables, I've tried a few examples to force it but it won't play ball. As you state, it always applies the full query first then the sampling which is not ideal. We looked at this as an option for a sample area rather than another physical copy but came to the conclusion that it would not be suitable for exactly these reasons. It would be good if the functionality of sample could be expanded to sample source tables first....any NCR guys out there think this is a good idea? Apologies for any confusion in the original mail, must remember to answer these mails later in the day when I've woke up. Personally, I still use MOD! Cheers Andy
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||