Viewing 15 posts - 1 through 15 (of 1,216 total)
It seems that it is the two operators following each other "/-" that causes unexpected behavior (not the minus at the beginning).
SELECT -100.0/-100.0*10.0 => 0.1
SELECT (-1*100.0)/-100.0*10.0 =>0.1
SELECT -100.0/(-1*100.0)*10.0 => 10
SELECT...
June 12, 2020 at 12:30 pm
August 10, 2018 at 5:32 am
hoseam (11/4/2015)
withdrawal_date
resigned_date
I want to check, if the member was active during '2013-01-01 and withdrawal_date. Now withdrawal_date can be anything really, it can be '2014-01-05' or '2010-05-02'....
And I'm using resigned_date...
November 4, 2015 at 6:21 am
Koen Verbeeck (10/15/2015)
Toreador (10/15/2015)
The correct answer is that an error occurs, as neither of those tables existsThe more correct answer would then be: "It depends".
You are absolutely right....
October 15, 2015 at 7:30 am
Hi Sharon,
unless you post the CREATE TABLE statements + INSERT INTO with sample data, it is just groping in the dark....
However, your PARTITION seems to be incorrect if I understand...
October 2, 2015 at 3:52 am
Hello,
without DDL of the objects used in this query, and sample data, we can only guess... maybe column Com_House_Final.ItemMonth is not a datetime? Maybe it does not contain any data...
September 29, 2015 at 3:48 am
Hello,
We are supporting a system that has all the main info about each product (quantity onhand, quantity ordered from suppliers, quantity ordered by customers etc.) stored very similarly as described...
September 17, 2015 at 7:12 am
Hello,
I think you should try to explain the requirements in more detail.
"I have a table with appdt as first appointment date and the another record for the same customer# has...
September 9, 2015 at 7:13 am
Solution of Luis seems to me to be the best of the 3 variants. My code has rounding problem (returns 55.55 instead of 55.56), which I overlooked before and only...
September 1, 2015 at 8:54 am
Hi,
this should do the trick :
SELECT pgroup,
CAST(installed as MONEY)/(installed+missing)*100 as percent_installed,
CAST(missing as MONEY)/(installed+missing)*100 as percent_missing
FROM (SELECT t5.pgroup, SUM(CASE WHEN t6.state='INSTALLED' THEN 1 ELSE 0 END) as installed, SUM(CASE...
September 1, 2015 at 8:40 am
You're welcome!
I noticed you are new... please, next time when you are posting a question, post CREATE TABLE and INSERT statement for sample data on which to test it,...
September 1, 2015 at 7:38 am
Hm... and what about the 'B' in column FEB ? Is that a typo or correct value?
In case it is correct value, you need to specify what it means... for...
September 1, 2015 at 5:27 am
Well, I'm glad it does approximately what you need, but it does not work properly in case where for the same siteID and month you have several rows - in...
September 1, 2015 at 3:32 am
Phil,
i may be mistaken, but I understand the reply with "consecutive months" precisely in the way you asked the question that is, that there is no overlapping except for...
September 1, 2015 at 3:21 am
Hi,
the fact that several rows of the same siteID can have '1' in a column complicates it... here is some simple code that I wrote before I knew of this,...
September 1, 2015 at 3:18 am
Viewing 15 posts - 1 through 15 (of 1,216 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy