× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Dan,
        
With T1 as (select ....)
INSERT INTO yourfile
Select (?) from SRCMBRHASH a join (...etc...)

Or 
With T1 as (select ....) ,T2 as (select ....) ,Tn as (Select ....)
INSERT INTO yourfile
Select (?) from SRCMBRHASH a join (...etc...)


(?) = an unknown field list that must match the format of the file on
the INSERT INTO statement.  Any select statement that is presented to
the display in STRSQL can be redirected to a file (either using the
INSERT INTO or if in STRSQL, F13, opt1, output type 3).

Tn =  is the upper limit (but I have no clue the limit) temporary table.


This SQL statement http://code.midrange.com/index.php?id=a2162df306
might give you an idea of how powerful temporary tables are in SQL.  I
find it very helpful to use them to break down complicated queries.


Thanks, Matt



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Dan
Sent: Thursday, June 15, 2006 3:49 PM
To: Midrange Systems Technical Discussion
Subject: Re: Cool but ugly SQL

On 6/15/06, Tyler, Matt <mattt@xxxxxxxxxxxxxx> wrote:

Dan,
This will work...

With T1 as (Select...)
Insert into yourtable
Select * from T1


But won't this take only those fields defined in the "Group by" clause?

- Dan

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.