Viewing 15 posts - 121 through 135 (of 187 total)
Thanks for trying to make the table description at least... Though just empty rows isn't going to help us much I think?
January 16, 2009 at 7:17 am
Make it a poll instead... 🙂 I think 1 and 2 would be equal in performance (it seems that the same amount of rows are touched, and every row is...
January 16, 2009 at 7:13 am
So I think the @WhereStatement wasn't actually part of the INSERT. If you get used to put the SQL in a variable, understanding of using the quotes is much easier....
January 16, 2009 at 5:19 am
I agree that putting the SQL statement in a variable could have solved the problem, but I think I got it anyway. If you add an extra ') to the...
January 16, 2009 at 5:05 am
Without any tabel description, sample data and desired output, it's hard to guess where the problem really is.
You can use DISTINCT in Views, so that's not the problem....
January 16, 2009 at 4:56 am
henkvisser (1/16/2009)
Server: Msg 170, Level 15, State 1, Line 4
[Microsoft][ODBC SQL Server Driver][SQL...
January 16, 2009 at 4:35 am
Ken McKelvey (1/13/2009)
SELECT T1.[Order], T1.OpNo, T1.Operation
    ,DENSE_RANK() OVER (ORDER BY T1.[Order], MAX(T2.OpNo)) AS GroupID
FROM YourTable T1
    JOIN YourTable T2
        ON T2.Operation = 'SETG'
            AND T1.[Order] = T2.[Order]
            AND T1.OpNo >= T2.OpNo
GROUP BY T1.[Order],...
January 13, 2009 at 5:17 am
MrBaseball34 (1/12/2009)
SELECT e.EncounterID, SUM(ed.Balance) as TotalAmt
FROM ptEncounterDetails ed
INNER JOIN ptEncounterEncounterDetail eed
ON eed.EncounterDetailID = ed.EncounterDetailID
INNER JOIN ptEncounter e
On e.EncounterID = eed.EncounterID
WHERE TotalAmt >= 5.00 AND
...
January 12, 2009 at 8:04 am
One thing I run into with such problems is fragmentation.
January 12, 2009 at 7:55 am
Please read the following for answers to these questions...
[font="Arial Black"]Solving the "Running Total" & "Ordinal Rank" Problems in SS 2k/2k5[/font][/url]
I'm still too attached to my VB way of thinking, so...
December 23, 2008 at 5:48 am
nazaninahmady_sh (12/23/2008)
Thanks alo Gailbut where i should write it?
In a New Query box in SSMS... So in the same place as where you have the query. So in SSMS,...
December 23, 2008 at 5:06 am
Last of the 3 questions all the options were true... I hope to see some questions where none or only 1 option is true... I'm going to click them all...
December 23, 2008 at 5:02 am
UPDATE #Results
SET @PrevCum_Sal = Cum_Sal = Sal + @PrevCum_Sal,
@PrevName = Name --Just an "anchor"
FROM...
December 23, 2008 at 4:11 am
Thanks for the input, though there were some flaws in it that made it a bit unclear what is desired exactly. Here I changed the input a bit, let me...
December 22, 2008 at 3:57 am
Viewing 15 posts - 121 through 135 (of 187 total)