Not able to create virtual table based on Null values
-
- Premium Member
- Posts: 59
- Joined: Fri Apr 22, 2011 8:02 am
Not able to create virtual table based on Null values
Hi,
I am trying to create a virtual table on Information Analyzer and I need to fetch all the records which have null value in a date field.
When I try to do END_DT IS NULL or END_DT = TO_DATE(NULL,'MM-DD-YYYY') in the free form editor it is not working. Though these are working directly on the database as queries.
I am getting the message saying "Invalid DateTime value entered, cannot be converted to DateTime format"
Does anyone know of any other way of doing this when creating virtual tables or if it is possible at all?
Thanks,
Madhumitha
I am trying to create a virtual table on Information Analyzer and I need to fetch all the records which have null value in a date field.
When I try to do END_DT IS NULL or END_DT = TO_DATE(NULL,'MM-DD-YYYY') in the free form editor it is not working. Though these are working directly on the database as queries.
I am getting the message saying "Invalid DateTime value entered, cannot be converted to DateTime format"
Does anyone know of any other way of doing this when creating virtual tables or if it is possible at all?
Thanks,
Madhumitha
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 59
- Joined: Fri Apr 22, 2011 8:02 am
Thank you so much for the response, I guess the column analysis is already done..
We are trying to create a virtual table with a valid set of data so that we can build data rules on them. Since we are using scd 2 we need to use records with null expiry_dt. This is where we are facing an issue.
Is there a way to filter it out before the rule definition?
Thanks,
Madhumitha
We are trying to create a virtual table with a valid set of data so that we can build data rules on them. Since we are using scd 2 we need to use records with null expiry_dt. This is where we are facing an issue.
Is there a way to filter it out before the rule definition?
Thanks,
Madhumitha
-
- Premium Member
- Posts: 59
- Joined: Fri Apr 22, 2011 8:02 am
Another option is to use the API to create a virtual table. You have more flexibility there than in the GUI. Create a file (NULLDATES.txt for example) with the following code. Replace all things inbetween | with your stuff:
<?xml version="1.0" encoding="UTF-8"?>
<iaapi:Project xmlns:iaapi="http://www.ibm.com/investigate/api/iaapi" name="|project Name|">
<DataSources>
<DataSource name="|DataSource|">
<Schema name="|Schema|">
<VirtualTable name="|Customer_No_Null_Dates|" baseTable="|BaseTable|">
<description>Customers with null dates</description>
<WhereCondition> END_DT IS NULL</WhereCondition>
<Column name="|COL1|"/>
<Column name="|COL2|"/>
<Column name="|COL3|"/>
</VirtualTable>
</Schema>
</DataSource>
</DataSources>
</iaapi:Project>
Then run c:\IBM\InformationServer\ASBNode\bin\IAAdmin.bat -user |user| -password |password| -host |host| -xml -update -projectContent c:\NULLDATES.txt
If all is ok, you will receive NO messages back. If there is an error, you will see a bunch of error messages.
The full XSD is documented at this link.
<?xml version="1.0" encoding="UTF-8"?>
<iaapi:Project xmlns:iaapi="http://www.ibm.com/investigate/api/iaapi" name="|project Name|">
<DataSources>
<DataSource name="|DataSource|">
<Schema name="|Schema|">
<VirtualTable name="|Customer_No_Null_Dates|" baseTable="|BaseTable|">
<description>Customers with null dates</description>
<WhereCondition> END_DT IS NULL</WhereCondition>
<Column name="|COL1|"/>
<Column name="|COL2|"/>
<Column name="|COL3|"/>
</VirtualTable>
</Schema>
</DataSource>
</DataSources>
</iaapi:Project>
Then run c:\IBM\InformationServer\ASBNode\bin\IAAdmin.bat -user |user| -password |password| -host |host| -xml -update -projectContent c:\NULLDATES.txt
If all is ok, you will receive NO messages back. If there is an error, you will see a bunch of error messages.
The full XSD is documented at this link.
Regards,
Robert
Robert
-
- Premium Member
- Posts: 59
- Joined: Fri Apr 22, 2011 8:02 am
-
- Premium Member
- Posts: 2
- Joined: Thu Jan 19, 2012 2:46 pm
-
- Premium Member
- Posts: 59
- Joined: Fri Apr 22, 2011 8:02 am
-
- Premium Member
- Posts: 2
- Joined: Thu Jan 19, 2012 2:46 pm