Viewing 15 posts - 1,831 through 1,845 (of 1,957 total)
Thomw (4/23/2010)
I didn't realize that the sort order when pulling from 'two' tables made a difference. Is this because...
April 23, 2010 at 5:06 pm
Here you go...Wayne had it just about right, but missed the sort order reversal required...
select [Datetime] = Manpower_Record_Time,
Unit_ID,
...
April 23, 2010 at 4:22 pm
WayneS (4/22/2010)
@mister.magoo - excellent use of cross apply. I was thinking of using ROW_NUMBER(), but this looks a lot better.Good job!
We will have to wait and see - maybe...
April 23, 2010 at 2:04 am
Assuming that Manpower_PK is an integer and is your Primary Key, and using just the data you posted, is this better for you?
--= set up some test data =--
declare @t...
April 22, 2010 at 5:00 pm
Terry Mott (4/22/2010)
I should be able to begin / commit / rollback a transaction in a stored procedure without worrying about whether an upstream procedure has begun a transaction...
April 22, 2010 at 12:47 pm
I would suggest you are calling it with too many parameters...
Can you post the code here for calling the proc...?
April 20, 2010 at 7:41 am
Can i just check that you meant to use the Access OLEDB to import an EXCEL table?
EDIT: ignore me - hadn't realised you can use that for Excel inm the...
April 20, 2010 at 5:40 am
Michael Meierruth (4/20/2010)
You state what I always wanted to hear stated, i.e. that ROW_NUMBER()'s ORDER BY is not the same as the SELECT's ORDER BY. Yet, always - haven't encountered...
April 20, 2010 at 5:38 am
In SSMS, find the function under msdb/programmability/Scalar-valued functions, then right-click on it and choose Modify (or script as create)
April 19, 2010 at 5:08 pm
You need to specify the collation you want to use
For example
SELECT Table1.Column1, Table1.Column2
FROM LinkedServer.db1.owner.Table1 AS Table1
JOIN db2.owner.Table2 AS Table2
ON Table1.Column1 = Table2.Column1 COLLATE SQL_Latin1_General_CP1_CI_AI
April 19, 2010 at 4:23 pm
Seeing as our versions are the same, you could "suck it and see" and use the code I posted to recreate the missing function - then hope that was all...
April 19, 2010 at 4:15 pm
Restore msdb from backup?
You do back it up right?
April 19, 2010 at 4:02 pm
Have you checked in the msdb database for the function it is trying to use?
On my system it looks like this:
CREATE function [dbo].[fn_DTA_unquote_dbname](@dbname nvarchar(258) )
returns sysname
as
begin
declare @unquote nvarchar(258)
set @unquote...
April 19, 2010 at 3:48 pm
Paul White NZ (4/18/2010)
Barkingdog (4/18/2010)
That was helpful.Would this interpretation of the original code be correct?
No, the ROLLBACK TRANSACTION would fail if the error had already caused the transaction to abort.
Use...
April 19, 2010 at 11:36 am
I personally prefer this version (modified code from previous post) as it has zero IO and is quicker on my machine by 13 seconds for 1,000,000,000 rows.
create function [dbo].[GetRange](@start int,...
April 19, 2010 at 7:57 am
Viewing 15 posts - 1,831 through 1,845 (of 1,957 total)