Viewing 15 posts - 4,531 through 4,545 (of 4,820 total)
I just realized my code will do an infinite loop if you add a new currency pair and don't have a rate for the first date in the range. ...
October 23, 2008 at 2:21 pm
Here's a solution that should work on SQL 2000, but if table vars are 2005 only, just convert them to temp tables:
--===== Create the test rates table
DECLARE @MyTestRates TABLE (
FromCurr...
October 23, 2008 at 2:05 pm
I'm not sure I see why you need to bother calling a function to execute a stored procedure. It's just another level of abstraction. Why not...
October 23, 2008 at 12:43 pm
You don't need a WHILE loop or anything of that nature. Here's a set-based solution you can use with any given input table:
DECLARE @LoginTable TABLE (
UserID int,
StartTime DateTime,
StopTime...
October 23, 2008 at 12:26 pm
Glad you have a working solution, but I feel the need to point out that with this new "split" table, the meaning of the value in the UNITS field has...
October 23, 2008 at 11:41 am
This sounds like a situation where if you know the date (from the data) of the first day of the week, then you can generate a list of column names...
October 23, 2008 at 8:26 am
Is it possible that an executable simply cannot be allowed to load more than 4 GB of data because that's the maximum possible address space for a 32-bit system?
I would...
October 22, 2008 at 8:22 am
While the previous post will handle a single amount converted at a fixed rate, I have to wonder what you need to do with historical information? There are...
October 22, 2008 at 8:13 am
I tried to post this late in the day, yesterday, but was having trouble with the website:
Dan - I believe AnzioBake has now likely found the solution, but even he...
October 22, 2008 at 7:12 am
I recently attended a computer user group meeting, and had the owner of a very small ISP tell me that MySQL outperforms SQL Server to a considerable degree, which I...
October 22, 2008 at 7:01 am
Dan,
Not to rain on your quest here, but I don't think you've actually provided a complete statement of the problem. I know that it's very clear to YOU...
October 21, 2008 at 8:26 am
You must be getting paid awfully well that you can afford to throw pork chops 1000 times a week. Oh... wait... it's the same pork chop...
October 17, 2008 at 6:35 am
The solution is easy - use COUNT with DISTINCT:
DECLARE @Tab1 TABLE (
Cpt varchar(50) COLLATE Cyrillic_General_CI_AS NULL
)
INSERT INTO @Tab1 (Cpt) VALUES('2')
INSERT INTO @Tab1 (Cpt) VALUES('235')
INSERT INTO @Tab1 (Cpt) VALUES('234')
INSERT INTO @Tab1...
October 16, 2008 at 9:08 am
Almost, but not quite... While the BS seems to occur more often than things getting done right the 1st time, I never allow myself to do things...
October 16, 2008 at 7:00 am
Ok, how about the following:
CREATE PROCEDURE dbo.PTENCOUNTER_STUFF (
@MRN varchar(5), -- '5079'
@DIC_Status varchar(10),
@ApptTypeID smallint
)
AS
BEGIN
SET NOCOUNT ON
;WITH DICTATION AS (
SELECT MRN, Status, DOS
FROM ptDictation
WHERE MRN = @MRN AND
Status = @DIC_Status
),
SCHEDULE AS (
SELECT...
October 15, 2008 at 11:55 am
Viewing 15 posts - 4,531 through 4,545 (of 4,820 total)