Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I want to give 2 conditions in a single IF Statement. Below is the query that I have used in my script, but I'm not getting the desired result that I need.
If([Report Due Date]>Date([End Date]+12) and IsNull([Target Group Conversion / Converted Customers]),'Not updated','Updated') as [Report Status],
Can anyone of you have a look at it and let me know the correct query?
Basically what I wanted to know is if [Report Due date] has crossed the [End date] by 12 days and if the [Target group conversion/Converted Customers] column is null then I need the [Report Status] column be shown as 'Not updated'
Regards,
Sidhiq
Hi,
I would approach like this
If(NUM([Report Due Date]) > NUM([End Date]+12) AND LEN(TRIM(([Target Group Conversion / Converted Customers])))=0,'Not updated','Updated') as [Report Status],
Numbers are easier to work with than dates and checking the length of a field is normally more successful that isNULL, as account so spaces in the field.
Mark
Hi Mark,
Thanks a ton. Its working fine now.
Best Regards,
Sidhiq
If you got the answers , mark the correct answer and close this thread