Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi every one,
suppose I have a field named AAA:
AAA
[139401,
139402,
139403,
139404,
139410,
139511]
I want to separate 2 numbers from the right of all this field values, in another word, I need to have toe field of AAA1 and AAA2:
AAA1
[1394,
1394,
1394,
1394,
1394,
1395]
and AAA2
[01,
02,
03,
04,
10,
11]
As I need to use tow variables of AAA1 and AAA2 in different calculations, so I think that I must use some functions on the script!
I would appreciate it if some one can help me.
Thank you in advance,
Zahra
Dear Sunny,
That was what I exactly did!
table1:
LOAD Tari,
Ta,
Left(Tari, 4) as AA1,
Right(Tari, 2) as AA2,
SubField( Ta,'|', 1) as a1,
SubField(Ta, '|', 2) as a2
FROM
(ooxml, embedded labels, table is Sheet1);
What error is it giving you when you are reloading it?
Syntax error, missing/misplaced FROM:
table1:
LOAD Tari,
Ta,
Left(Tari, 4) as AA1,
Right(Tari, 2) as AA2,
SubField( Ta,'|', 1) as a1,
SubField(Ta, '|', 2) as a2,
FROM
(ooxml, embedded labels, table is Sheet1)
table1:
LOAD Tari,
Ta,
Left(Tari, 4) as AA1,
Right(Tari, 2) as AA2,
SubField( Ta,'|', 1) as a1,
SubField(Ta, '|', 2) as a2,
FROM
(ooxml, embedded labels, table is Sheet1)
Do you have ; after the last statement?
table1:
LOAD Tari,
Ta,
Left(Tari, 4) as AA1,
Right(Tari, 2) as AA2,
SubField( Ta,'|', 1) as a1,
SubField(Ta, '|', 2) as a2,
FROM
(ooxml, embedded labels, table is Sheet1);
Yes, I do!
My bad, remove the comma after a2
table1:
LOAD Tari,
Ta,
Left(Tari, 4) as AA1,
Right(Tari, 2) as AA2,
SubField( Ta,'|', 1) as a1,
SubField(Ta, '|', 2) as a2
FROM
(ooxml, embedded labels, table is Sheet1);
Yes, I do that but the problem is: it shows dashes for a2 !
Your delimiter '|' doesn't match the delimiter in your sample data ('/')
1394/01
1394/03
1395/10
Seems something has changed. Please provide a current data sample.