Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a Problem in my DB. When i load the data from 2014. in some places, because of the user error. there some dates like 2090,2030 etc and also months.
How to filter data while loading from 2014 jan 1st to Todays date.
This is the filter which i used while loading the data to get data from 2014 jan1st.
FROM cmsdhcc.dbo."department_income_view" where YEAR("d_date") >=2014;
Hi,
You can add where filter in your SQL statement smth like below:
where YEAR("d_date") >=2014 and "d_date"<=GETDATE(); - example for SQL server
or
You can filter out in your LOAD satement:
LOAD *
Where date(d_date)<=today()
;
SQL SELECT ...
Hope this helps you.
Regards,
Andrei
Hi,
You can add where filter in your SQL statement smth like below:
where YEAR("d_date") >=2014 and "d_date"<=GETDATE(); - example for SQL server
or
You can filter out in your LOAD satement:
LOAD *
Where date(d_date)<=today()
;
SQL SELECT ...
Hope this helps you.
Regards,
Andrei
Hi,
Use and trunc(d_date)<=trunc(sysdate())
try below
FROM cmsdhcc.dbo."department_income_view" where YEAR("d_date") >=2014 and trunc(d_date)<=trunc(sysdate());
Regards