Skip to main content

Hi @nishitaparmar, I think it's possible if the table has a column that stores the date when each record was inserted or updated. Otherwise, it might be difficult.


Thanks @takashi; but i don't have that for each attribute row. The only thing I have the sql function which give me the last update date for each table in the database.


If you can retrieve table names and those last update date by the function, this procedure might be possible.

  1. SQLCreator: Execute the SQL function to create features having two attributes - table name and last update date.
  2. Tester: Select only features whose last update date matches the day before yesterday.

  3. FeatureReader: Read features for each table.

If you can retrieve table names and those last update date by the function, this procedure might be possible.

  1. SQLCreator: Execute the SQL function to create features having two attributes - table name and last update date.
  2. Tester: Select only features whose last update date matches the day before yesterday.

  3. FeatureReader: Read features for each table.
Perhaps does the SQL function return a last update date for a specified single table? If so, create a table names list, read the list, and then execute the function for each table with the SQLExecutor.

 


Sounds logical to me. This is what i did, but not much success

1. SQL Creator - select name,
modify_date
from sys.tables (used the select statement for my non spatial sql)

2. Tester - but this resulted in reading all 213 tables instead of 3 that were modified yesterday

3. Feature Reader - Requires me to add all the tables from my DB and when i run it, it results in nothing.

Maybe my tester information is not right... really appreciate your help :)


Perhaps does the SQL function return a last update date for a specified single table? If so, create a table names list, read the list, and then execute the function for each table with the SQLExecutor.

 

this could work too... but how to read the list?

 

 


Sounds logical to me. This is what i did, but not much success

1. SQL Creator - select name,
modify_date
from sys.tables (used the select statement for my non spatial sql)

2. Tester - but this resulted in reading all 213 tables instead of 3 that were modified yesterday

3. Feature Reader - Requires me to add all the tables from my DB and when i run it, it results in nothing.

Maybe my tester information is not right... really appreciate your help :)

Two issues.
  1. The "modify_date" column of the sys.tables table (inherited from the sys.objects) stores the last date when ALTER statement was applied to the table. I'm afraid that it may not be your desired "last update date".
  2. Since the format of the date value from the query will be "YYYYmmddHHMMSS.nnn", you need to change the format (e.g. "YYYYmmdd") and then compare it with the date value of yesterday (e.g. "20161103"). The DateFormatter and the TimeStamper might help you.
See also here to learn more about the issue #1.

 

Microsoft Developers Network | sys.objects (Transact-SQL)

 


Reply