Viewing 15 posts - 13,126 through 13,140 (of 13,870 total)
You are correct in stating that the first piece of SQL identifies all the latest owners and their assets, but by performing a self join back to the orig table...
March 31, 2006 at 8:13 am
Not strange really. MS Access is a database, a development environment, an end-user environment ... it tries to do pretty much everything.
SQL Server is a pure database environment - it...
March 31, 2006 at 7:12 am
Something like this ... ?
select myTable.ID, myTable.AssetID, myTable.UserID, myTable.DateUpdated
from myTable join (select t2.assetID, max(t2.dateupdated) from myTable t2 group by t2.assetid) t3 on myTable.AssetID = t3.AssetID and myTable.DateUpdated = t3.DateUpdated
where...
March 31, 2006 at 5:19 am
OK - that's Analysis Services, not straight T-SQL. Analysis Services is one of Microsoft's business intelligence tools (design of OLAP cubes etc). It is complementary to SQL.
March 31, 2006 at 5:11 am
VBA functions do not work directly within chunks of T-SQL, as far as I know. Please post the quote from BOL that says they do.
March 31, 2006 at 4:15 am
This works for periods less than 1 day.
declare @secs float
set @secs = 15000
select convert(char(8), cast(@secs / 86400 as datetime), 8)
March 31, 2006 at 2:59 am
No, nothing like INSERT UNIQUE - your query is fine.
March 30, 2006 at 1:41 am
Do you have a backup of the database anywhere?
If not, you are in trouble.
March 30, 2006 at 1:39 am
SPs do not handle user interaction - your app does that.
It should then call SPs, with appropriate parameters, to do the data processing side - whether it be data retrieval,...
March 29, 2006 at 8:18 am
As I said, you need to use single quotes.
declare @quote char(1)
set @quote = '''' --4 single quote characters
'DELETE ' +
' WHERE dssid = ' + @quote + @vchdssid +...
March 29, 2006 at 5:41 am
Use single quotes around literals in SQL Server. To debug, try running your statement in Query Analyser and see what happens.
By the way, this looks like a horrendously complex routine for...
March 29, 2006 at 4:07 am
Stored procedures should perform better, in general. Network traffic is optimised and SQL Server should be able to reuse execution plans when running SPs multiple times.
March 28, 2006 at 9:37 am
When the system finds a 'duplicate', what logic should be used to determine which of them to delete?
March 28, 2006 at 9:30 am
Are you using Access to delete the data?
If you are using linked tables within Access, you must ensure that Access knows the primary key of the table when you link...
March 28, 2006 at 3:24 am
Viewing 15 posts - 13,126 through 13,140 (of 13,870 total)