🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.interbase.sql
2 messages
2 total messages Started by Quique Tue, 03 Dec 2002 18:30
select a blob field from differents tables for report
#11146
Author: Quique
Date: Tue, 03 Dec 2002 18:30
23 lines
2075 bytes
Hi, i woulk like to know if this is possible:

I would like to get in a stored procedure or a view the data of one table
"master" only that in this table "master" exists a field with the name of
one table of 5 existing in the DB, These tables has a blobl field named
"IMPRE" with differents values only that i have to take the value of the
field in the table that it name is in the "master" table.

The relation is MASTER.NUMEST = [ANYTABLEOFFIVE].NUMEST

So if in one record in the master table, the field "TABLE" is : CONSUL, i
have to take the value of the field "IMPRE" from the table "CONSUL" or if
the field "TABLE" in the master table is : ULTRAS, i have to take the value
of the field "IMPRE" from the table "ULTRAS" and so, existing the other 3
tables where i can take the value of their field "IMPRE"

i'll apreciate any help

thanx in advance

bye

QuiQue
Re: select a blob field from differents tables for report
#11148
Author: Bill Todd
Date: Tue, 03 Dec 2002 19:18
35 lines
2210 bytes
You can use a stored procedure with "if then else if" logic to
determine which table to include in the query.

On Tue, 3 Dec 2002 12:30:14 -0600, "Quique"
<quique_gdlt@puebla.megared.net.mx> wrote:

>Hi, i woulk like to know if this is possible:
>
>I would like to get in a stored procedure or a view the data of one table
>"master" only that in this table "master" exists a field with the name of
>one table of 5 existing in the DB, These tables has a blobl field named
>"IMPRE" with differents values only that i have to take the value of the
>field in the table that it name is in the "master" table.
>
>The relation is MASTER.NUMEST = [ANYTABLEOFFIVE].NUMEST
>
>So if in one record in the master table, the field "TABLE" is : CONSUL, i
>have to take the value of the field "IMPRE" from the table "CONSUL" or if
>the field "TABLE" in the master table is : ULTRAS, i have to take the value
>of the field "IMPRE" from the table "ULTRAS" and so, existing the other 3
>tables where i can take the value of their field "IMPRE"
>
>i'll apreciate any help
>
>thanx in advance
>
>bye
>
>QuiQue
>


--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads