Viewing 15 posts - 271 through 285 (of 699 total)
I'll have to check your query when I get to work, but no, the calculations I made were correct.
The records that are Type = 1 are the ones which are...
October 6, 2011 at 7:10 am
In the end I ended up solving my problem by just investigating it a bit more and discovering it wasn't quite as extreme as the question that I'm asking in...
October 5, 2011 at 10:35 am
You have two options. If this is a 1-to-1 lookup, and you are just looking for the value to exist, then first, put a Lookup Transform in. Have the lookup...
October 5, 2011 at 8:02 am
I'd already checked that part, but I can post the execution logs for you to see if you can find an improvement. The first version took 45 minutes to run....
October 5, 2011 at 7:45 am
Another possible solution:
WITH cte AS
(
SELECT
#Records.Date,
#MoreRecords.[Value],
ROW_NUMBER() OVER (PARTITION BY #Records.JoinValue, #Records.Date ORDER BY #MoreRecords.[Value] DESC) AS rowNum
FROM #Records
LEFT JOIN #MoreRecords ON#MoreRecords.JoinValue = #Records.JoinValue
AND #MoreRecords.Date <= #Records.Date
AND #MoreRecords.[Value] IS NOT NULL
)
SELECT...
October 4, 2011 at 1:54 pm
I don't think I have the full picture, but here's how I would do it, based on what you've said:
Step 1: Import Records
For each one of your files, grab the...
September 29, 2011 at 1:21 pm
Yeah I find it's much better to use a database table for configuration variables. That way it becomes easily portable to a new machine.
September 29, 2011 at 7:52 am
You should start a new thread instead of posting on a year-old one.
What is the problem exactly? What's the error message?
September 28, 2011 at 2:06 pm
You would normally be right Stamey.
The problem is that you have a double-nested IF statement.
So while normally lets say your code was written like this:
IF A = B
SELECT 1
SELECT 2
You...
September 28, 2011 at 12:09 pm
You should start a new thread instead of using an existing one.
Is your ID column in your database a field with a default value, either explicitly defined or defined by...
September 28, 2011 at 9:07 am
Cool - just tested my approach and it seems to work:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:Kiran Ramaswamy
-- Create date: Sept. 27, 2011
-- Description:Transfer a stored proc from a remote...
September 27, 2011 at 1:19 pm
I wonder, if you had linked servers between all of your servers in question, and they all used the same naming convention, if you could just use those to implement...
September 27, 2011 at 7:16 am
stick with DT_NUMERIC, since it allows you to set the precision and scale.
Try changing it to (DT_NUMERIC,13,5), or more decimal places, cast it to a string ,and then substring to...
September 27, 2011 at 7:04 am
Just curious, any reason you're not using sys.procedures with OBJECT_DEFINITION instead Evil Craig F?
September 26, 2011 at 2:03 pm
This is what I meant by testing and playing around with it yourself 😛
Anyway, after setting up a test environment on my end and messing around with it, this should...
September 26, 2011 at 2:02 pm
Viewing 15 posts - 271 through 285 (of 699 total)