SQLEXPRESS Select * from

Post Reply
User avatar
MarcoBoschi
Posts: 925
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

SQLEXPRESS Select * from

Post by MarcoBoschi »

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
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: SQLEXPRESS Select * from

Post by Rick Lipkin »

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
User avatar
MarcoBoschi
Posts: 925
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: SQLEXPRESS Select * from

Post by MarcoBoschi »

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
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: SQLEXPRESS Select * from

Post by Rick Lipkin »

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
User avatar
MarcoBoschi
Posts: 925
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: SQLEXPRESS Select * from

Post by MarcoBoschi »

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
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Re: SQLEXPRESS Select * from

Post by Marc Vanzegbroeck »

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
User avatar
MarcoBoschi
Posts: 925
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: SQLEXPRESS Select * from

Post by MarcoBoschi »

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
Patrizio
Posts: 90
Joined: Wed Nov 07, 2007 8:56 am
Location: Italy
Contact:

Re: SQLEXPRESS Select * from

Post by Patrizio »

You can try this:

Code: Select all

SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, *
FROM sys.dm_db_index_usage_stats
 
http://msdn.microsoft.com/it-it/library/ms188755.aspx
Post Reply