Hi,
I have a table T1, which has a column 'dNum', and computed column.
I also have another table CT, which just contains a single field 'Conv' holding a conversion factor.
How can I define the computed column to hole (dNum * CT.Conv)?
If I use ...
'CREATE TABLE T1 (' ...etc.
'Comp1 COMPUTED BY (dNum * CT.Conv)'
I get an error saying CT.Conv does not belong to the referenced table.
How do I do this please?
Many thanks
Referencing other tables
Moderators: gto, cipto_kh, EgonHugeist
Hi Ben,
I forgot to say I'm using Firebird, Zeos, Delphi5.
What the problem is, is that I have a column which holds a dimension in inches, but I need to display it in inches, cm, mm etc. (user selectable)
I thought a computed column would do the trick, but I'm open to suggestions.
I'll take a look at Views, as I haven't used them before.
Many thanks
Kerin
I forgot to say I'm using Firebird, Zeos, Delphi5.
What the problem is, is that I have a column which holds a dimension in inches, but I need to display it in inches, cm, mm etc. (user selectable)
I thought a computed column would do the trick, but I'm open to suggestions.
I'll take a look at Views, as I haven't used them before.
Many thanks
Kerin
Hi,
I've had a look at creating a view, but still seem to have the same problem i.e. how do I reference a field from another table.
Is there another way to do this?
The actual conversion factor is a variable in the Delphi program, so is there any way I can reference this in the computed field?
Many thanks - Keirn
I've had a look at creating a view, but still seem to have the same problem i.e. how do I reference a field from another table.
Is there another way to do this?
The actual conversion factor is a variable in the Delphi program, so is there any way I can reference this in the computed field?
Many thanks - Keirn
-
- Expert Boarder
- Posts: 158
- Joined: 06.11.2005, 01:43