Viewing 15 posts - 1,711 through 1,725 (of 2,171 total)
Lynn is almost there. I think the INNER JOIN should be replaced with a LEFT JOIN, the get all zero counts too.
SELECT
h.
April 6, 2007 at 1:33 pm
Why do everyone expect the DocID to be sequential?
SELECT
t.*
FROM Table1 AS t
WHERE t.
April 6, 2007 at 1:27 pm
I think you have to post your eight business rules how to handle all cases with values vs NULL.
Col1 Col2 Col3 Result
---- ---- ---- ------
5 5 5 30
5 ...
April 4, 2007 at 1:16 pm
SELECT Col1, Col2, Col3, COALESCE(Col1, 1) * COALESCE(Col2, 1) + COALESCE(Col3, 0) AS Result
FROM Table1
Col1 = objRs("Col1")
Col2 = objRs("Col2")
Col3 = objRs("Col3")
Result = objRs("Result")
April 4, 2007 at 1:13 pm
That I can agree on!
But it is not uncommon. One of my clients are in the Insurance business. They have some formulas in an application that can export the values...
April 4, 2007 at 11:04 am
Yes. It is slower. I told so in the previous post.
BUT...
The upside is how easy it is to change the number of columns to investigate.
2? No problems. 11? No problems. Slower? Yes....
April 4, 2007 at 7:57 am
Am I too late?
This method is about 15% slower, but is easier to read (and extend to more columns, with or without the use of dynamic sql?)
SELECT
...
April 4, 2007 at 7:09 am
Some useful readings
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=72097
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=73079
April 4, 2007 at 6:52 am
Yes, you can make a table-valued functions and use as any other table or view.
Select t1.* FROM Table AS t1
INNER JOIN fnUserFunction(1) AS u ON u.SomeCol = t1.ThirdCol
Note that if you...
April 4, 2007 at 3:16 am
April 4, 2007 at 3:01 am
1) Why would I? Then you have no control over the datatype for the aggregated column VALUE (sum).
2) The syntax is wrong. It should be SELECT .. INTO...FROM ... WHERE...
April 3, 2007 at 10:51 pm
April 3, 2007 at 7:51 am
Viewing 15 posts - 1,711 through 1,725 (of 2,171 total)