Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Actually I tried to manage my database and I wanted to know how can I delete an entire field.
Header 1 | Header 2 | Header 3 |
---|---|---|
Field 1 | User 1 | PWD 1 |
Field 2 | User 2 | PWD 2 |
Field 3 | user 3 | PWD 3 |
If I delete Field 2:
Header 1 | Header 2 | Header 3 |
---|---|---|
Field 1 | User 1 | PWD 1 |
Field 3 | User 3 | PWD 3 |
Regards
Hi KennyHua
We can not delete any field from data model. But we can do following:
1. We can not select the field in SELECT statement
2. We can comment the field
3.We can use DROP Field FieldName from TableName statement.
Hope this will help you.
you can use dropfiled function
drop Field YourField;
Do you mean data you have loaded into QlikView?
If you loaded it as Table1:
Table2:
Load * resident Table1 where Header1 <> 'Field2';
Drop Table1;
Hi Kenny,
seems you want to delete one row and not a field. If so you can use the file wizard and easily delete the marked row or chose a conditon to conditionally delete it:
Hope this helps
Burkhard
Hi
If you want to delete a row in an already loaded table, you could only use another resident load excluding the problem row.
I suggest you go wiith the solution given by rnt
That's how I interpreted it based on the data example, that it was a row to be deleted.
It's very interesting, but do you know if it's possible de keep the column name ? Because actually when I take your way, Each column is replaced by @1, @,2 and I want to keep Header 1, Header 2, ...
I don't want to creat alias because I have a lot of table to manage
Regards
Hi Kenny,
no need to create aliases. Simply click on embedded lables. See below
Regards
Burkhard
Hi,
Sorry to keep asking you, but I got something different with your picture:
DELETE:
LOAD
Header 1,
Header 2,
Hearder 3
FROM
[..\DATA\TABLES - Copie\COUNTRY.qvd]
(qvd, filters(
Remove(Row, Pos(Top,$(vNB_OF_ROW)))
));
And I got with the Wizard:
Regards
I still think it would be easier to do it in a resident load
INPUT:
LOAD
Header 1,
Header 2,
Hearder 3
FROM
[..\DATA\TABLES - Copie\COUNTRY.qvd]
(qvd);
DELETE:
Load * resident INPUT where Header1 <> 'Field2';
Drop Table INPUT;