Viewing 15 posts - 3,376 through 3,390 (of 5,504 total)
Would the following code snippet help you to get started?
DECLARE @tbl TABLE(account_number CHAR(8),payment_amt DECIMAL(6,2),DATE_PAYMENT_DUE DATETIME, num INT)
INSERT INTO @tbl
SELECT '10043997', 379.28 ,'2009-11-01 00:00:00.000', 1 UNION ALL
SELECT '10043997', 379.28 ,'2009-12-01 00:00:00.000',...
June 2, 2010 at 3:43 pm
divyanth (6/2/2010)
using a CTE instead of a sub query would improve the performance of the query...
AFAIK this is actually not true, since both, CTE and subquery will result in...
June 2, 2010 at 2:52 pm
@bteraberry:
I guess the biggest challenge would be to come up with a replacement for ROW_NUMBER().
To substitute UNPIVOT and the CTE is a lot easier to handle...
Maybe there is a tally...
June 2, 2010 at 2:39 pm
I don't know how you update that table (through stored procedure or a direct statement)...
Let's assume the following code:
UPDATE Blah
SET col1=1, col2=...
FROM Blah
WHERE condition
Why not change it to
UPDATE Blah...
June 2, 2010 at 2:24 pm
Would you mind reducing your post from 500 lines of code to the issue you're struggling with? If your issue is not to see the line break in your mail,...
June 2, 2010 at 1:44 pm
Regarding the INSERT trigger: I would use DEFAULT values for those two columns instead.
Regarding UPADTE: why don't you include the ModifiedDate column in your update procedure / statement?
June 2, 2010 at 1:29 pm
It doesn't matter how you define the variable in your WHERE condition. All that matters is that you need to use a variable instead of an direct link to one...
June 2, 2010 at 1:19 pm
The only thing I would change in bteraberry's solution is the split string function. I would use the DelimitedSplit8K function (search this site for the string) to avoid the while...
June 2, 2010 at 1:15 pm
Please see Eric Russells reply on your other thread. It's basically the same problem with the same solution. Just a different ACCESS form...
June 2, 2010 at 1:03 pm
Let's see if the following code will give the requested result:
SELECT id, transdate AS begindate, account, #temptable_1.username, quantity, grossamt, netamt, transdate AS enddate, workcode, transdate,NBTotal
FROM #temptable...
June 2, 2010 at 12:57 pm
The problem is your GROUP BY username condition within your subselect.
This may cause more than one value (e.g. two NBTotal's if there are two username) leading to the error you...
June 2, 2010 at 12:35 pm
It depends.
Which ID do you want as a result? The one from FirstTable or the one from the table generated by the split function? How do you plan to deal...
June 2, 2010 at 11:42 am
daniarchitect (6/1/2010)
I have been trying it the whole night yesterday and all the day today.. and it didn't work out.. (it goes well till some point and then...
June 1, 2010 at 3:32 pm
Sergiy (6/1/2010)
What you need is a properly formatted query with GROUPING and ROLLUP.
If you look up BOL for these key words you'll...
June 1, 2010 at 3:21 pm
You don't need to.
But it certainly helps performance... 😀
There are numerous split string functions available. Somer perform better than others...
I'm not sure if you're running SQL2000 (I assume you do...
June 1, 2010 at 3:09 pm
Viewing 15 posts - 3,376 through 3,390 (of 5,504 total)