| |

VerySource

 Forgot password?
 Register
Search
Author: muxiaoke

Difficult for help, can't figure out the idea, let's look at it

[Copy link]

3

Threads

17

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-1-5 18:48:01
| Show all posts
There is a question, I don't understand, that is:
select company id, company name, sum (amount) as total from
(
                   select * from [1]
                   union all
                   select * from [2]
) t
There is no concept related to "request time" in this case.
and request time <(case when @enddate is null then request time + 1 else @enddate end)
and request time> (case when @startdate is null then request time-1 else @startdate end
Can it be added to this t-table, the younger brother does not yet understand
Reply

Use magic Report

3

Threads

17

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 United States

Post time: 2020-1-5 18:51:01
| Show all posts
There is a question, I don't understand, that is:
select company id, company name, sum (amount) as total from
(
                   select * from [1]
                   union all
                   select * from [2]
) t
There is no concept related to "request time" in this case.
and request time <(case when @enddate is null then request time + 1 else @enddate end)
and request time> (case when @startdate is null then request time-1 else @startdate end
Can it be added to this t-table, the younger brother does not yet understand
Reply

Use magic Report

2

Threads

6

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-1-5 19:57:01
| Show all posts
There is a question, I don't understand, that is:
select company id, company name, sum (amount) as total from
(
                   select * from [1]
                   union all
                   select * from [2]
) t
There is no concept related to "request time" in this case.
and request time <(case when @enddate is null then request time + 1 else @enddate end)
and request time> (case when @startdate is null then request time-1 else @startdate end
Can it be added to this t-table, the younger brother does not yet understand
Reply

Use magic Report

3

Threads

17

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-1-8 12:00:02
| Show all posts
Got it, thank you
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list