Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Edit Record on QVD

Guys, I need your help..

How to write script for edit record on QVD?

for example:

Update table_a

set Map_2='Other'

where Map_2='Opex'

Thank before.

15 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Load

Field1, Field2,

If(Match(Map_3, 'Depreciation','Fixed Assets','GA Exp'),'Other',Map_3) as Map_3

FROM QVDFileName.qvd;

STORE Data INTO QVDFileName.qvd;

Regards,

Jagan.

Not applicable
Author

Hi Mr. Jagan,

I try with script:

Table_a:

Load

Cost_Centre, Periode_Report, Amount,

if(match(Periode_Report,'201311','201312','201401','201402','201403')

     and Match(Cost_Centre,'S812','S813')

     and Match(Map_1='Expense','Other','Map_1') as Map_1,

if(Match(Periode_Report,'201311','201312','201401','201402','201403')

     and Match(Cost_Centre,'S812','S813')

     and Match(Map_2='OPEX','Other OPEX','Map_2') as Map_2

but when I'm trying to reload, show messagebox 'error expression'

Can u help me for the correct script?

Thanks before.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

Table_a:

Load

Cost_Centre, Periode_Report, Amount,

if(match(Periode_Report,'201311','201312','201401','201402','201403')

     and Match(Cost_Centre,'S812','S813')

     and Match(Map_1, 'Expense'), 'Other',Map_1) as Map_1,

if(Match(Periode_Report,'201311','201312','201401','201402','201403')

     and Match(Cost_Centre,'S812','S813')

     and Match(Map_2, 'OPEX'), 'Other OPEX',Map_2) as Map_2

Regards,

jagan.

Not applicable
Author

Hi Mr. Jagan,

Your script is correct, but the problem is when not match then record is 'Map_1', I want when not match then the record same as before like 'assets',or 'liability' etc.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

Table_a:

Load

Cost_Centre, Periode_Report, Amount,

if(match(Periode_Report,'201311','201312','201401','201402','201403')

     and Match(Cost_Centre,'S812','S813')

     and Map_1 <> 'Expense'), 'Other',Map_1) as Map_1,

if(Match(Periode_Report,'201311','201312','201401','201402','201403')

     and Match(Cost_Centre,'S812','S813')

     and Match(Map_2, 'OPEX'), 'Other OPEX',Map_2) as Map_2

Regards,

jagan.

Not applicable
Author

Hi Mr. Jagan.

it's so amazing, I'm so proud of you (y).

I just wanna say thank u very much. Finally I can finish it and very2 happy.

Regards.