Problem with ALTER TYPE_OF
Posted: Sun Apr 01, 2018 6:26 am
I like ALTER especially as a handy point and click convenience.
Changes from integer and rational respectively to character are successful.
Now try to apply the following changes to above relation:
Change from character to integer:
Returns:
Returns:
Change from character to rational:
Returns:
Change from integer to rational:
Returns:
Change from rational to integer:
Returns:
I just note that every error suggests an operand of CHARACTER regardless of whether CHARACTER is
part of TYPE_OF or not.
thanks
Code: Select all
VAR T1 BASE REL{A CHAR, B INT, C RAT, D CHAR, E INT, F RAT}KEY{ };
T1:=REL{TUP{A "10", B 10, C 10.0, D "20", E 20, F 20.0}};
Code: Select all
ALTER VAR T1
TYPE_OF B TO CHARACTER
TYPE_OF C TO CHARACTER;
WRITELN T1{ATTRIBUTES_OF(T1)};
RELATION {A CHARACTER, D CHARACTER, E INTEGER, F RATIONAL, B CHARACTER, C CHARACTER} {
TUPLE {A "10", D "20", E 20, F 20.0, B "10", C "10.0"}}
Change from character to integer:
Code: Select all
ALTER VAR T1
TYPE_OF B TO INTEGER;
Returns:
Code: Select all
ERROR: RS0278: No run-time invocation targets found for INTEGER(CHARACTER)
Code: Select all
ALTER VAR T1
TYPE_OF A TO INTEGER;
Code: Select all
ERROR: RS0278: No run-time invocation targets found for INTEGER(CHARACTER)
Code: Select all
ALTER VAR T1
TYPE_OF C TO RATIONAL;
Code: Select all
ERROR: RS0278: No run-time invocation targets found for RATIONAL(CHARACTER)
Code: Select all
ALTER VAR T1
TYPE_OF E TO RATIONAL;
Code: Select all
ERROR: RS0278: No run-time invocation targets found for RATIONAL(CHARACTER)
Code: Select all
ALTER VAR T1
TYPE_OF F TO INTEGER;
Code: Select all
ERROR: RS0278: No run-time invocation targets found for INTEGER(CHARACTER)
part of TYPE_OF or not.
thanks