hi,
i wrote this code in mysql:
create table bag1 (imsi varchar(20) , bserv varchar(20) , msisdn varchar(20) , vlr varchar(20) );
create table bag3 (imsi varchar(20) , bserv varchar(20) , msisdn varchar(20) , vlr varchar(20) );
SELECT bag1.imsi , bag1.msisdn , bag1.vlr , "hlrbag1" , "MTN"
FROM bag1
where (bag1.vlr like "98935%") and (bag1.bserv="T11")
union
SELECT bag1.imsi , bag1.msisdn , bag1.vlr , "hlrbag1" , "Talia"
FROM bag1
where (bag1.vlr like "98932%") and (bag1.bserv="T11");
i need to put 2 new coulomns with the words "hlrbag1" and "MTN" next to each line outpout from SELECT, thats why i wrote "hlrbag1" , "MTN" at the end of the SELECT statement, the output i get is fine except that i get it on 2 separate lines , i need to have the output on one line. here is what i get:
imsi msisdn vlr hlrbag1 Iran_MTN
41820105 9647803 989350002
hlrbag1 MTN
41820806 96478086 9893500021
hlrbag1 Talia
i need it to be looks like this:
imsi msisdn vlr hlrbag1 MTN
41820105 9647803 989350002 hlrbag1 MTN
41820806 96478086 9893500021 hlrbag1 Talia
is it possible?