Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ecabanas
Creator II
Creator II

Replace in load script

Hi I have an excel table like this:

 

External ID
FV00306466
FV00306300
FV100306418
FV20306474
FV30306432
FV30306316

I would like to import to QV and replace:

1º When it's FV0 replace to PV0

2º If is FV1 till FV9 replace to PR1....PR9

Is it possible?

Many thank's

Eduard

1 Solution

Accepted Solutions
rubenmarin

Hi, there is a character difference, maybe with:

If(Left([External ID], 3)='FV0',

Replace([External ID], 'FV', 'PV'),

Replace([External ID], 'FV', 'PR') as [External ID]

View solution in original post

4 Replies
sunny_talwar

So, are you trying to change the first two letter from FV to PR? May be this:

LOAD Replace([External ID], 'FV', 'PR') as [External ID],

ecabanas
Creator II
Creator II
Author

Hi Sunny again!!

it's correct but not exactly, if begins FV0 has to be PV0 but if it begins with FV1 till FV9 has to be PR1 till PR9

rubenmarin

Hi, there is a character difference, maybe with:

If(Left([External ID], 3)='FV0',

Replace([External ID], 'FV', 'PV'),

Replace([External ID], 'FV', 'PR') as [External ID]

sunny_talwar

Hahahaha okay, may be this

Replace(Replace([External ID], 'FV0', 'PV0'), 'FV', 'PR') as [External ID],