FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour SQLEXPRESS Select * from
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
SQLEXPRESS Select * from
Posted: Wed Nov 21, 2012 03:24 PM

I have to import from SqlExpress.
Database is not mine anc cannot modified

Tables do not have a date_time field in thir structure.

How can I import records modified today?
Any hints?

marco

Marco Boschi
info@marcoboschi.it
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: SQLEXPRESS Select * from
Posted: Wed Nov 21, 2012 03:33 PM

Marco

Hopefully there is a unique RowId column ( preferably auto number ) that perhaps you can use to determine ( guess ) when a record was added to the table based on its relative position to all the other RowId's

Just a long shot there :|

Rick Lipkin

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: SQLEXPRESS Select * from
Posted: Wed Nov 21, 2012 03:36 PM

And what about date & time?
In this way I can only import new records but not records modified for instance yesterday
Excuse me for my bad english
marco

Marco Boschi
info@marcoboschi.it
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: SQLEXPRESS Select * from
Posted: Wed Nov 21, 2012 04:41 PM

Marco

To be honest with you .. I do not know a way to determine when a row went into a table .. especially without a datetime column .. Google did not tell me much either.

Sorry
Rick Lipkin

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: SQLEXPRESS Select * from
Posted: Thu Nov 22, 2012 07:34 AM

Rick,
It's true no information such like this
I am disappointed that in a very important (and famous) application and we have not sold will be a date time field

I am disappointed that in a very famous application program does not exist a date and time field in every table.
It's incredible!
I have to import every day all tables?
More than 150!
Now I invent something

Marco Boschi
info@marcoboschi.it
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: SQLEXPRESS Select * from
Posted: Thu Nov 22, 2012 08:43 AM

Marco,

If the tables have an unique auto-increment ID-field, you can import for each table the records with a higher ID-number than the highest ID-number that you imported the day before of that table.
Then you only add the new records...

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: SQLEXPRESS Select * from
Posted: Thu Nov 22, 2012 09:01 AM

Marc,
some tables have one date type field but is not the same concept
In my dbf tables I have two field utemodi , datmodi User and date time of last replace performed

Marco Boschi
info@marcoboschi.it
Posts: 90
Joined: Wed Nov 07, 2007 08:56 AM
Re: SQLEXPRESS Select * from
Posted: Thu Nov 29, 2012 02:56 PM
You can try this:

Code (fw): Select all Collapse
SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, *
FROM sys.dm_db_index_usage_stats


http://msdn.microsoft.com/it-it/library/ms188755.aspx

Continue the discussion