Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I use this script
Inputfield testfield;
Tablename:
Load *,
testfield;
SQL select
A,
B,
C,
D
From tablename;
I get an error message field <testfield> unknown and I do not understand why.
Changing the order (load testfield, * ) does not help
Your help is appreciated
try this
Tablename:
Load *
SQL select
A,
B,
C,
D
From tablename;
Inputfield testfield;
noconcatenate
table2:
load *, testfield
resident Tablename;
drop table Tablename
hope this help.
Your inputfield must be a real field either from the sql or created new with an alias:
Inputfield testfield;
Tablename:
Load *,
0 as testfield;
SQL select
A,
B,
C,
D,
testfield
From tablename;
- Marcus
May be try this:
Inputfield testfield;
Tablename:
LOAD *,
0 as testfield;
SQL select
A,
B,
C,
D
From tablename;
You can also try,
INPUTFIELD testfield;
Tablename:
SQL select
A,
B,
C,
D,
'' as testfield
From tablename;
Hi Marcus
I have never used INPUTFIELD, but it looks handy, so I thought I'd do some testing.
This is my script, which seems very similar to yours, but produces an error (Duplicate Keys). I must be misunderstanding, but could you explain ?
Thanks
INPUTFIELD Quantity;
LOAD *, 0 AS Quantity
INLINE [
F1, Quantity1
1, 0
3, 0
1, 0
23, 0
15, 0
];
The assignment from a inputfield value within the table (not absolutely sure but I believe within the whole datamodel) must be absolutely unique which is not given in your example (I have marked it with a bigger font):
INPUTFIELD Quantity;
LOAD *, 0 AS Quantity
INLINE [
F1, Quantity1
1, 0
3, 0
1, 0
23, 0
15, 0
];
- Marcus
Ah, OK Marcus, thanks for your prompt response.
Thank you all for your answer. As soon as I return from holidays I will try to look further
Hi Curiousfellow,
Before commentiong, I would like to know, does you table has field named as testfield ?
Regards,
Mahamed