PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → New column & Duplicate record removal
New column & Duplicate record removal
Débuté par Punith, 12 sep. 2022 15:51 - Aucune réponse
Posté le 12 septembre 2022 - 15:51
Hello,

There are three questions

1) I am trying to run a query and create the column based on the record available in the table. but all the column names take the first record of the table. here are my code details
LOOP (4)
NbNewColumns = 1
FOR nIndex = 1 TO NbNewColumns
NewColumnName = Table_SLB_SSComponents..Name + ".COL_"+nIndex
NewColumn <- ControlCreate(NewColumnName, typColumn)
HExecuteQuery(Req_ToolName,hQueryDefault)
HReadFirst(Req_ToolName, Req_ToolName.ToolNname)
NewColumn.Caption = (Req_ToolName.ToolNname)

END
END

output is a column created as ADN ADN ADN ADN
I need the column name as ADN NCR BUN TRA

2) how to remove duplicates from a number of rows, I tried distinct not useful
example:
SEC
SEC
SEC
here duplicate should remove only populate SEC

3) Button to select all rows from the table and load the excel file


Please help me to create the code