Viewing 13 posts - 1 through 13 (of 13 total)
This is what worked for me, but any rooms for improvement or suggestions is gratefully appreciated:
SELECT account, name, street, due_date
FROM my_table
WHERE
CAST(CONVERT(VARCHAR,due_date,102) AS DATETIME) = (
case when CONVERT(VARCHAR,due_date,102) = CONVERT(VARCHAR,GETDATE() ,102)
then...
April 7, 2022 at 6:30 pm
Maybe using case isn't the right approach for this.
April 7, 2022 at 5:32 pm
Hi there,
There are a few that will have ccc_ and a name after instead of just numbers like the others.
Thanks!
September 14, 2020 at 4:32 pm
Hi, they are not, I have one table called master, the others are named like acc_ and some numbers and letters after that. All I am trying to do is...
September 10, 2020 at 12:34 am
Hi the idea is good, but running into some issues with your query;
WTIH t_data AS
(SELECT DISTINCT id as id, account_number as acc
FROM t_02
UNION
SELECT DISTINCT id as id2, account_number as acc2
FROM...
September 9, 2020 at 4:31 pm
Hi there!
I know my question was some how abstract but trying to simplifying it:
a) What do you expect as the result of this query?
I have one table, lets called it...
September 4, 2020 at 3:08 pm
March 29, 2017 at 1:52 pm
;
WITH mytable_dr AS
(
SELECT account_id, event_time, [sign],
DENSE_RANK() OVER(ORDER BY CAST(event_time...
March 29, 2017 at 12:43 pm
sgmunson - Wednesday, March 29, 2017 12:29 PMThat's what I get as well. Is it correct?
No, this is what it should...
March 29, 2017 at 12:34 pm
This is what I get:
account_id | event_time | sign | |
---|---|---|---|
1 | 2251 | 28.03.2017 19:00:04 | YES |
2 | 2251 | 28.03.2017 19:00:04 | YES |
3 | 2251 | 28.03.2017 19:00:04 | YES |
4 | 2250 | 28.03.2017 15:45:11 | NO |
5 | 2250 | 28.03.2017 15:45:11 | NO |
6 | 2250 | 28.03.2017 15:45:11 | NO |
7 | 2250 | 28.03.2017 01:01:45 | NO |
8 | 2250 | 28.03.2017 01:01:45 | NO |
9 | 2250 | 28.03.2017 01:01:45 | NO |
March 29, 2017 at 12:21 pm
To answer my own question, this worked:
SELECT name,
address,
email,
CASE
...
October 7, 2013 at 7:02 am
It gives:
"Error: [SQL0171] Argument 1 of function CASE not valid."
October 3, 2013 at 11:18 am
Hi,
Thanks for your replay, but it still returns empty values for all results even when I have data in the "date" ( the column name "date" I...
October 3, 2013 at 9:25 am
Viewing 13 posts - 1 through 13 (of 13 total)