I have a SQL statement like this:
EDIT :
SELECT
location as Location
FROM
Table1
WHERE
OnsiteOffshore = 'Offshore' AND Acc_Code = 'ABC'
UNION
SELECT
Country
FROM
Table1
WHERE
OnsiteOffshore = 'Onsite' AND Acc_Code = 'ABC'
This SQL query gives these results:
Chennai
Bangalore
USA
NewZealand
But due to some requirement I need the output like this:
Chennai
Chennai
Chennai
Chennai
Bangalore
Bangalore
Bangalore
Bangalore
USA
USA
USA
USA
NewZealand
NewZealand
NewZealand
NewZealand
Mean to say each location needs to be output 4 times.
Pls help how to get the same.
See Question&Answers more detail:os