J
Juls
I have 2 tables
Call time
Ref Date Centre QNo ACW ACD
3816911 38169 1 1 1.1 1.2
3816912 38169 1 2 2.1 2.2
3816913 38169 1 3 3.1 3.2
3816911 38169 2 1 1.4 7
3820011 38200 1 1 1 10
3820012 38200 1 2 2 12
3820013 38200 1 3 3 13
Queues
Ref Centre QNo QName ShNme
11 1 1 Motor NB MNB
12 1 2 Packages NB PNB
13 1 3 SBC NB CNB
What I want is-
Queues.Qno Queues.ShNme Calltime.acw Calltime.acd
1 MNB 1.1 1.2
2 PNB 2.1 2.2
3 CNB 3.1 3.2
When Calltime.date <=38169 and centre = 1 or
Queues.Qno Queues.ShNme Calltime.acw Calltime.acd
1 MNB 1 10
2 PNB 2 12
3 CNB 3 13
When Calltime.date <=38200 and centre = 1 (the Calltime.date is the
date code from excell)
I need the sql to query the database from Excel but just can't get it
to work,
I think I need to do a sub query but I can't work it out.
Many Thanks in advance.
Juls
Call time
Ref Date Centre QNo ACW ACD
3816911 38169 1 1 1.1 1.2
3816912 38169 1 2 2.1 2.2
3816913 38169 1 3 3.1 3.2
3816911 38169 2 1 1.4 7
3820011 38200 1 1 1 10
3820012 38200 1 2 2 12
3820013 38200 1 3 3 13
Queues
Ref Centre QNo QName ShNme
11 1 1 Motor NB MNB
12 1 2 Packages NB PNB
13 1 3 SBC NB CNB
What I want is-
Queues.Qno Queues.ShNme Calltime.acw Calltime.acd
1 MNB 1.1 1.2
2 PNB 2.1 2.2
3 CNB 3.1 3.2
When Calltime.date <=38169 and centre = 1 or
Queues.Qno Queues.ShNme Calltime.acw Calltime.acd
1 MNB 1 10
2 PNB 2 12
3 CNB 3 13
When Calltime.date <=38200 and centre = 1 (the Calltime.date is the
date code from excell)
I need the sql to query the database from Excel but just can't get it
to work,
I think I need to do a sub query but I can't work it out.
Many Thanks in advance.
Juls