Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
neapicture
Contributor III
Contributor III

Insert single record in table

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

1 Solution

Accepted Solutions
cwolf
Creator III
Creator III

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'

];

View solution in original post

3 Replies
Mark_Little
Luminary
Luminary

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

cwolf
Creator III
Creator III

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'

];

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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.