🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.data.sql
Article #75

Tough SQL question: How to avoid redundancy in a subquery!

#75
From: sh2222
Date: Wed, 21 Apr 1999 00:00
11 lines
1051 bytes
Suppose I have a subquery within a query.  The query gets its data
directly from a table.  It uses some criteria to pick certain records.
The subquery (a select statement) within the query uses the same
criteria.  Is there any way to reference the query, in the 'From'
clause of the subquery for instance, in order to avoid repeating the
same criteria for the subquery?  I'm not even sure if this makes any
sense since the subquery is part of the query! Confused? I am!

Thanks, 

A.
Technical Details
Message-ID: <371e6590.88535179@news.insync.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,d058e8e6a86ab595,start
X-Google-Attributes: gidff5a1,public
From: sh2222@yahoo.com
Subject: Tough SQL question: How to avoid redundancy in a subquery!
Date: 1999/04/21
Message-ID: <371e6590.88535179@news.insync.net>
X-Deja-AN: 469338224
X-Complaints-To: news@insync.net
X-Trace: insync 924739284 209.113.36.25 (Wed, 21 Apr 1999 19:01:24 CDT)
Organization: Insync Internet Services, Inc.
NNTP-Posting-Date: Wed, 21 Apr 1999 19:01:24 CDT
Newsgroups: borland.public.vdbase.data.sql