Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Change blank entries from database

Hi,

this is a part of my script:

MitgliedArb:

SQL SELECT AbmeldeDatum

FROM "CRM".dbo.MitgliedArb;

The field "AbmeldeDatum" is in the database partially empty.

These blank entries should be changed into a date like "01.01.2500".

Can someone help me ?

5 Replies
sunil2288
Creator III
Creator III

HI Dirk

You can write

if(value(Abmeldedatum=' ',value(Abmeldedatum)='01-01-2500',value(Abmeldedatum)) as Abmeldedatum

Regards

Sunil

Not applicable
Author

In the script main page


SET NULLDISPLAY=<01.01.2500>;


jonathandienst
Partner - Champion III
Partner - Champion III

Hi

On SQL Server:

SQL SELECT COALESCE(AbmeldeDatum,CONVERT(datetime, '01.01.2500', 104)) AS AbmeldeDatum

FROM "CRM".dbo.MitgliedArb;

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi

Please write this script.

if(trim(len(AbmeldeDatum))=0,'null',AbmeldeDatum) as AbmeldeDatum

Regards

Ashish


Anonymous
Not applicable
Author

Thank you all.

I use the solution from Ashish Srivastava.

The other proposals also work´s.