Page 1 of 1

SQLEXPRESS Select * from

Posted: Wed Nov 21, 2012 3:24 pm
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

Re: SQLEXPRESS Select * from

Posted: Wed Nov 21, 2012 3:33 pm
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

Re: SQLEXPRESS Select * from

Posted: Wed Nov 21, 2012 3:36 pm
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

Re: SQLEXPRESS Select * from

Posted: Wed Nov 21, 2012 4:41 pm
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

Re: SQLEXPRESS Select * from

Posted: Thu Nov 22, 2012 7:34 am
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

Re: SQLEXPRESS Select * from

Posted: Thu Nov 22, 2012 8:43 am
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...

Re: SQLEXPRESS Select * from

Posted: Thu Nov 22, 2012 9:01 am
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

Re: SQLEXPRESS Select * from

Posted: Thu Nov 29, 2012 2:56 pm
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