Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Insert single record in table
Hello, I invite from an SQL database, a table and would like to add a single record permanently, since this subject is not in the DB there.
This script exists:
-----------------------------------------------
projects:
SQL SELECT `projekt_bereich`,
`projekt_bereichsleiter`,
`projekt_beschreibung`,
`projekt_ende`,
`projekt_id`,
`projekt_kundenbetreuer`,
`projekt_name`,
`projekt_start`
FROM `qlik_reporting`.`projekte`;
insert into projects (`projekt_id`,` projekt_name`) VALUES (0, 'Absence types');
// Save the table on Server
store * from projects into $ (vDatenquelle) timo_projekte.qvd (QVD);
DROP TABLE timo_projekte;
-------------------------------------
but the Insert command does not work in Qlik.
I just want to insert a record with Projekt_ID "0". the ProjectID is then "Absence types" assigned as projekt_name.
Is there a way Thanks much in advance
projects:
SQL SELECT `projekt_bereich`,
`projekt_bereichsleiter`,
`projekt_beschreibung`,
`projekt_ende`,
`projekt_id`,
`projekt_kundenbetreuer`,
`projekt_name`,
`projekt_start`
FROM `qlik_reporting`.`projekte`;
Concatenate(projects)
LOAD * INLINE [
projekt_id,projekt_name
0,'Absence types'
];
Hi,
What exactly you trying to do?
Just add a new row to the table as you can do a concatenate and do an inline load with the data?
Or a new column just add in the qlikview load
'Thing' as NewField.
Mark
projects:
SQL SELECT `projekt_bereich`,
`projekt_bereichsleiter`,
`projekt_beschreibung`,
`projekt_ende`,
`projekt_id`,
`projekt_kundenbetreuer`,
`projekt_name`,
`projekt_start`
FROM `qlik_reporting`.`projekte`;
Concatenate(projects)
LOAD * INLINE [
projekt_id,projekt_name
0,'Absence types'
];
I think you can do better than "it doesn't work". For example, what error message do you get when you execute this script?
If you want to add a record to your source database (WriteBack), switch to R/W mode (see Script Editor->Bottom right tab called 'Settings'->Open databases in Read/Write mode) and add the SQL keyword in front of the INSERT statement.
If you just want to add a new project record to the loaded data in QlikView, see the suggestions by Christian & Mark.