Viewing 13 posts - 2,881 through 2,893 (of 2,893 total)
Sorry, but your anwers made it even more obscure:
What you mean by "the last not null field"?
1. Do you want to select AskSideRWsize if the BidSideRWsize is null?
use ISNULL(BidSideRWsize,...
May 12, 2010 at 9:17 am
What you mean by "the last not null field"?
1. Do you want to select AskSideRWsize if the BidSideRWsize is null?
use ISNULL(BidSideRWsize, AskSideRWsize)
2. If both values (AskSideRWsize...
May 12, 2010 at 8:43 am
"Quirky Update" way
Here we are:
1. I would not use it if I would be you.
2. If you deside to use it, you must read
"The RULES" section of...
May 12, 2010 at 8:03 am
I had typo in my query. New one should give you your expected results:
;WITH PrevDate
AS
(
SELECT f.ClientCode, f.FlowDate, f.TempletID, f.AssetCode, MAX(f1.FlowDate) as PrevFlowDate
FROM #Flows f
LEFT JOIN #Flows f1
ON f.CLientCode...
May 12, 2010 at 7:19 am
Just another small advice:
Don't use stored proc input parameters directly in the WHERE clause of query, copy them into the local variables first and use the local variables instead.
It will...
May 12, 2010 at 5:10 am
Try to update table statistics after update:
UPDATE STATISTICS WC_PERSON_F_M_CN
May 12, 2010 at 4:47 am
As being minimalist, the following single line will also work to set your param to null if it is a blank (or spaces) without any trims and checks for length...
May 12, 2010 at 4:42 am
Is it what you want?
;WITH PrevDate
AS
(
SELECT f.ClientCode, f.FlowDate, f.TempletID, f.AssetCode, MIN(f1.FlowDate) as PrevFlowDate
FROM #Flows f
LEFT JOIN #Flows f1
ON f.CLientCode = f1.ClientCode
AND f.TempletID = f1.TempletID
AND f.AssetCode = f1.AssetCode
AND...
May 12, 2010 at 4:24 am
You are welcome!
As I said in my post, each devider in your monster formula should be checked for zero value.
I have gut feeling that this spaggeti-formula can be significantly cut...
May 11, 2010 at 6:55 pm
OK,
Here we are:
1. We create a sample table
create table txns
(
PmtAmount money
,PmtDate Datetime
)
insert into txns
select -2750,'20080205'
union select 1000,'20080705'
union select 2000,'20090105'
2. Then we calculate your...
May 11, 2010 at 3:18 pm
That the good one!
There are no such thing in SQL!
You can code it yourself if you wish and have time to do so (you will need to find...
May 11, 2010 at 10:46 am
Your formula looks a bit strange, especially the place where you substructing 1.
You can try the following:
ISNULL(
(
(
(
...
May 11, 2010 at 10:38 am
If you are really need to implement this logic in a trigger, use INSTEAD OF one. With appropriate compatibility level (80 or higher) - it should work.
May 11, 2010 at 9:44 am
Viewing 13 posts - 2,881 through 2,893 (of 2,893 total)