Subject | RE: [firebird-support] Temporary tables |
---|---|
Author | Garrett Smith |
Post date | 2004-12-17T17:45:33Z |
The number of permutations could become very large over time. We could
be talking about 100+ tables with 32+ columns each. Would a view with
3200+ columns be feasbile? If I could get away with it, it would
certainly simplify things.
-- Garrett
Rick DeBay wrote:
be talking about 100+ tables with 32+ columns each. Would a view with
3200+ columns be feasbile? If I could get away with it, it would
certainly simplify things.
-- Garrett
Rick DeBay wrote:
> Why would you drop the view for every query? I assume there is a--------------------------------------------------------------------~->
> fixed number of tables that can be queried in this manner, and a
> limited number of ways they can be combined.
>
> Rick DeBay
>
> -----Original Message-----
> From: Garrett Smith [mailto:garrett@...]
> Sent: Friday, December 17, 2004 12:27 PM
> To: firebird-support@yahoogroups.com
> Subject: RE: [firebird-support] Temporary tables
>
>
> The two tables are just examples -- I don't know ahead of time which
> tables will be involved.
>
> Would I still want use a view, even though I'd be creating a new one
> (and then dropping it) for every query?
>
> -- Garrett
>
> Rick DeBay wrote:
>> Create a view based on the two tables, and query the view.
>>
>> -----Original Message-----
>> From: Garrett Smith [mailto:garrett@...]
>> Sent: Friday, December 17, 2004 12:06 PM
>> To: firebird-support@yahoogroups.com
>> Subject: RE: [firebird-support] Temporary tables
>>
>>
>> I have several tables that I want to query as if their rows were in a
>> single table. My thinking was to use a temporary table and execute
>> multiple 'select into' queries to populate it and then run a final
>> select against it.
>>
>> E.g., given two tables:
>>
>> foo ( id integer, name varchar)
>> bar ( id integer, name varchar, status integer)
>>
>> I want a structure looks like:
>>
>> some_structure (
>> name varchar,
>> status integer,
>> foo_name varchar,
>> bar_name varchar,
>> bar_status integer)
>>
>> so I can run queries like:
>>
>> select id from some_structure where name = 'Baz' or status = 1;
>> select id from some_structure where foo_name = 'Baz' or bar_status
>> = 1;
>>
>> Rows from table foo would NULL values for status. The underlying
>> applications lets users select objects (represented by id) by
>> specifying property name values. We validate input to ensure that an
>> unqualified properties (e.g. 'name', as opposed to 'bar_name') have
>> compatible types.
>>
>> -- Garrett
>>
>> Ann W. Harrison wrote:
>>> At 10:39 AM 12/17/2004, Garrett Smith wrote:
>>>
>>>
>>>> Does Firebird 1.5 support temporary tables in any way?
>>>
>>> No, but if you explain what you're trying to do, we can
>>> probably suggest an alternative that will work well.
>>>
>>>
>>> Regards,
>>>
>>>
>>> Ann
>>>
>>>
>>>
>>> ------------------------ Yahoo! Groups Sponsor
>>> --------------------~--> Make a clean sweep of pop-up ads. Yahoo!
>>> Companion Toolbar. Now with Pop-Up Blocker. Get it for free!
>>> http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/67folB/TM
>>>
>>
>
>>>--------------------------------------------------------------------~->
>>>
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>
>>
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ------------------------ Yahoo! Groups Sponsor
>> --------------------~--> $4.98 domain names from Yahoo!. Register
>> anything. http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/67folB/TM
>>
>
>>--------------------------------------------------------------------~->
>>
>> Yahoo! Groups Links
>>
>>
>>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~--> Make a clean sweep of pop-up ads. Yahoo!
> Companion Toolbar. Now with Pop-Up Blocker. Get it for free!
> http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/67folB/TM
>
>
>
> Yahoo! Groups Links
>
>
>