HomeForum
Welcome, Guest

Calculation Function
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Calculation Function

Calculation Function 4 years, 7 months ago #466

  • Wei202
I am using Visual Importer 4.7.8 Trial version on Windows XP.
I am loading from flat file to Oracle 10g. After I have tested and ensure all the fields are all loaded properly, I decided to try something more "advanced" than just simply "Mapped To". I wanted to test the "Calculated" mapping. And I want to strip of the first character of a field that i have mapped successfully to using "Mapped To". However, I find that no matter what expression I used. The following is the "Template" definition:

Field=ORACLE_FIELD_1
Mapping=Calculated
MappedTo=
Calculated=SubString([CSV_ACCOUNTNO],2,14)
Format=
Default=
IfNull=Ignore
IfError=Set To Null
Key=False

RE: Calculation Function 4 years, 7 months ago #467

  • Wei202
I made a typo above. I wanted to say that "However, I find that no matter what expression I used", I always get a null value returned. Calculation function works when I supply a hardcoded string instead of the field from CSV.

RE: Calculation Function 4 years, 7 months ago #468

  • mike8888
  • OFFLINE
  • Expert Boarder
  • Posts: 131
  • Karma: 0
Try this one

SubString("[CSV_ACCOUNTNO]",2,14)

Mike

RE: Calculation Function 4 years, 7 months ago #469

  • Wei202
Thanks. It works now !

Just a little suggestion here - I think in the Help section on "How to perform calculations", perhaps a line can be added to highlight that when performing string manipulation, the source field needs to be enclosed with the quotes. Otherwise, it is not clear that quotes are needed because the first example is a numeric "maniuplation" and did not use quotes. And as first impression always matters, a reader may NOT notice the subtle difference of the multiplication example (which came first) and the string example.
  • Page:
  • 1
Time to create page: 0.15 seconds

Testimonials

"Advanced ETL Processor it is the only software which treats our POP3 server as a database server."

Tom Barker,
Director of Information Technology

User Login

You only need to log in or register to use our support forum



Our customers

BP

BBC

HSBC


Databases we work with

Go to top