sgmunson (8/18/2014)Okay, so now the excuse for not explaining EVERYTHING is that some of the columns aren't in use??? Really? Sorry, but I'm done with this. Every explanation I've seen so far has done little or nothing to make this the slightest bit more clear. This person simply can't be bothered, and seems more interested in leading a chase than actually getting useful answers. I'm simply not willing to help someone that insists on playing this game.

Can you just not reply instead of writing provocatively to discourage others from providing solutions ?

Can you just post what you were asked for repeatedly instead of avoiding it like the plague? I'm absolutely certain it would get better results than what you've provided so far.

sgmunson (8/18/2014)Okay, so now the excuse for not explaining EVERYTHING is that some of the columns aren't in use??? Really? Sorry, but I'm done with this. Every explanation I've seen so far has done little or nothing to make this the slightest bit more clear. This person simply can't be bothered, and seems more interested in leading a chase than actually getting useful answers. I'm simply not willing to help someone that insists on playing this game.

Can you just not reply instead of writing provocatively to discourage others from providing solutions ?

I, for one, would be happy to consider your problem...but from reading thro this thread...I have to agree that DDL and sample data (and the expected results based on your sample data) would help considerably.

so far all I see is DDL for two tables (out of six?) and no sample data or expected results.

I would expect that if you provide what has been requested that your problem can be resolved quickly and with tried and tested code.

kind regards

edit typos

______________________________________________________________you can lead a user to data....but you cannot make them think and remember....every day is a school day

sgmunson (8/18/2014)Okay, so now the excuse for not explaining EVERYTHING is that some of the columns aren't in use??? Really? Sorry, but I'm done with this. Every explanation I've seen so far has done little or nothing to make this the slightest bit more clear. This person simply can't be bothered, and seems more interested in leading a chase than actually getting useful answers. I'm simply not willing to help someone that insists on playing this game.

Can you just not reply instead of writing provocatively to discourage others from providing solutions ?

I, for one, would be happy to consider your problem...but from reading thro this thread...I have to agree that DDL and sample data (and the expected results based on your sample data) would help considerably.

so far all I see is DDL for two tables (out of six?) and no sample data or expected results.

I would expect that if you provide what has been requested that your problem can be resolved quickly and with tried and tested code.

kind regards

edit typos

I'm also still in. Paul, can you please provide INSERTs to populate the two tables with say 30 or 40 rows of data? I think it could go a long way to sorting this out. Cheers.

I'm also still in. Paul, can you please provide INSERTs to populate the two tables with say 30 or 40 rows of data? I think it could go a long way to sorting this out. Cheers.

Thank you all for your eagerness to help.

On popular demand , please find the DDL and sample data for all the tables used in the query below. Just a humble request, could you please use the query below as the basis for your code as it returns correct resultset in terms of row counts. I mean I wish to use the functionality of my query but at the same time want to show all the listed countries as shown in the attached screenshot (2 examples) if no data exists.

INSERT INTO [MG_BOOKING_ITINERARY]VALUES('1','HSMB','22E')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('2','JKB','B071S')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('3','CSCEX','005E')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('4','GDGB','052E')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('5','HJSP','0009E')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('6','CSCEX','005E')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('7','HNJEUR','0005E')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('8','STPAO','016W')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('9','HPHO','121W')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('10','HPHO','122W')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('11','HPHO','121W')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('12','CSNGY','034W')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('13','COSPRD','009W')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('14','COSPRD','009W')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('15','HMBB','038W')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('16','HMBB','038W')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('17','HKGB','021E')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('18','HKGB','021E')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('19','YMUPSU','001E')INSERT INTO [MG_BOOKING_ITINERARY]VALUES('20','YMUPSU','001E')

insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('20T86','1')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('40D96','2')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('20T86','3')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('40D96','4')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('20T86','5')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('40D96','6')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('40D96','7')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('45T96','8')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('40W96','9')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('45Y96','10')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('20W96','11')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('20W96','12')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('40W96','13')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('20W96','14')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('20W96','15')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('45W96','16')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('40W96','17')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('20W96','18')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('40W96','19')insert into [MG_BOOKING_EQUIPMENT_REQ_DETAIL]values('20W96','20')

Just a quick FYI to make everyone aware that the posted query doesn't work with the posted table inserts, and that you'll need to add a right paren to one of the table create statements as it's missing in the posted code. The query is looking for mgd.BOOKING_OFFICE_CD, and that table does not contain such a field, nor do any of the other tables. Note also that the OP has STILL NOT EXPLAINED the relevance of the individual tables to the desired result. Thus the posted code, for all practical purposes, is useless.

Some might complain that I had bowed out on this post, so why am I still responding? Simple, really... Between the arrogance of the OP posting the words "On popular demand", as if to indicate they had no intention of posting what was requested, and only did so when pushed into it; and the subsequent failure of the OP to even post usable code. I have to wonder if the OP is even qualified to perform the work at all...

That kind of disrespect in a post is not particularly excusable, and I'm not going to help this poster continue to waste anyone's time any further.

sgmunson (8/19/2014)Just a quick FYI to make everyone aware that the posted query doesn't work with the posted table inserts, and that you'll need to add a right paren to one of the table create statements as it's missing in the posted code. The query is looking for mgd.BOOKING_OFFICE_CD, and that table does not contain such a field, nor do any of the other tables. Note also that the OP has STILL NOT EXPLAINED the relevance of the individual tables to the desired result. Thus the posted code, for all practical purposes, is useless.

Some might complain that I had bowed out on this post, so why am I still responding? Simple, really... Between the arrogance of the OP posting the words "On popular demand", as if to indicate they had no intention of posting what was requested, and only did so when pushed into it; and the subsequent failure of the OP to even post usable code. I have to wonder if the OP is even qualified to perform the work at all...

That kind of disrespect in a post is not particularly excusable, and I'm not going to help this poster continue to waste anyone's time any further.

If you can see properly, I posted a smiley next to 'On popular demand' as it was intended to be in humour.

Just to make you aware, I reported you yesterday for your provocative post and I am going to report you now again for the similar thing you have done now.

I'm pretty sure I can't force anyone to do anything. I don't need to. Clearly, you'd rather complain than actually solve your problem. You need to realize that when you are getting free assistance, biting the hand that feeds you is a bad idea. Continually avoiding providing any useful information is also a pretty good way to stop getting help. I'm pretty sure any lack of assistance coming from other members will be appropriately proportional to your lack of respect for the value of the time of those providing such assistance.

sgmunson (8/19/2014)I'm pretty sure I can't force anyone to do anything. I don't need to. Clearly, you'd rather complain than actually solve your problem. You need to realize that when you are getting free assistance, biting the hand that feeds you is a bad idea. Continually avoiding providing any useful information is also a pretty good way to stop getting help. I'm pretty sure any lack of assistance coming from other members will be appropriately proportional to your lack of respect for the value of the time of those providing such assistance.

I am not asking for your assistance anymore so stop replying. You have done enough damage now.