🚀 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 joseph Wed, 09 Jul 2008 09:45
Custom Field Name in select statement
#178
Author: joseph
Date: Wed, 09 Jul 2008 09:45
14 lines
1281 bytes
Is there a way I can return a custom field name (based on data in another
table) using a select statement as follows:

Select Cat1Code as (Select CatCode From Category)
from Test


I know I can use:
Select Cat1Code as HTL
FROM Test


but I want the HTL 'alias' retrieved from another table
Re: Custom Field Name in select statement
#179
Author: Wayne Niddery (TeamB)
Date: Wed, 09 Jul 2008 15:29
21 lines
1656 bytes
"joseph" <pelli@euroweb.net.mt> wrote in message 
news:487488b3$1@newsgroups.borland.com...
>
> Is there a way I can return a custom field name (based on data in another
> table) using a select statement as follows:
>
> Select Cat1Code as (Select CatCode From Category)
> from Test


No. Values are values, meta names are meta names.

You can select the alias as a separate field and then deal with it in the 
application:

 Select Cat1Code,  (Select CatCode From Category) as CatName
 from Test

-- 
Wayne Niddery - TeamB (www.teamb.com)
Winwright, Inc. (www.winwright.ca) 
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