Skip to main content
Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for 
Search instead for 
Did you mean: 
johnan
Creator III
Creator III

Store Table & Column as columname in QVD

Hi community.

Is there possible to change the columns from DB when i Store to QVD?

I wan't the format [Table.Name]_Column saved to my QVD

Possible?

Br

John

 

Labels (1)
2 Replies
micheledenardi
Specialist II
Specialist II

Try with Qualify statement.

LIB CONNECT TO 'SQLSERVER';
Qualify *;

LOAD 
    "COD_SITE",
    "DOC_MESE",
    "TMP_MESE",
    "COD_CDC_SAP";
SQL SELECT "COD_SITE",
    "DOC_MESE",
    "TMP_MESE",
    "COD_CDC_SAP"
FROM MES.PRESENZE;

And you table will be created with the table name added before the field name:

2022-10-03 15_15_04-Window.png

Than you have only to store your QVD as always..

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
rubenmarin

Hi, yes, you can use 'as' to rename field names.

LOAD
 BDFieldName1 as [TableName.QvdFieldName1],
 BDFieldName2 as [TableName.QvdFieldName2],
...

You can also the sentence Qualify *;, wich by dafult renames each field setting the QV table name before the field name