SQLEXPRESS Select * from

SQLEXPRESS Select * from

Postby MarcoBoschi » Wed Nov 21, 2012 3: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
User avatar
MarcoBoschi
 
Posts: 1025
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: SQLEXPRESS Select * from

Postby Rick Lipkin » Wed Nov 21, 2012 3: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
User avatar
Rick Lipkin
 
Posts: 2634
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: SQLEXPRESS Select * from

Postby MarcoBoschi » Wed Nov 21, 2012 3: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
User avatar
MarcoBoschi
 
Posts: 1025
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: SQLEXPRESS Select * from

Postby Rick Lipkin » Wed Nov 21, 2012 4: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
User avatar
Rick Lipkin
 
Posts: 2634
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: SQLEXPRESS Select * from

Postby MarcoBoschi » Thu Nov 22, 2012 7: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
User avatar
MarcoBoschi
 
Posts: 1025
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: SQLEXPRESS Select * from

Postby Marc Vanzegbroeck » Thu Nov 22, 2012 8: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
Marc Vanzegbroeck
 
Posts: 1157
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: SQLEXPRESS Select * from

Postby MarcoBoschi » Thu Nov 22, 2012 9: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
User avatar
MarcoBoschi
 
Posts: 1025
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: SQLEXPRESS Select * from

Postby Patrizio » Thu Nov 29, 2012 2:56 pm

You can try this:

Code: Select all  Expand view

SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, *
FROM sys.dm_db_index_usage_stats
 


http://msdn.microsoft.com/it-it/library/ms188755.aspx
Patrizio
 
Posts: 90
Joined: Wed Nov 07, 2007 8:56 am
Location: Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Horizon and 52 guests