Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i have a table with data
Bike_ID | Bike_Name |
---|---|
1 | Royal |
1 | Enfield |
2 | Harley |
2 | Davidson |
But i want the output data table like
Bike_ID | Bike_Name |
---|---|
1 | Royal Enfield |
2 | Harley Davidson |
How can we get this?
Load script like this should do the trick:
Data:
LOAD Bike_ID, Concat(Bike_Name, ' ', RecNo()) as Bike_Name GROUP BY Bike_ID;
LOAD * INLINE [
Bike_ID, Bike_Name
1, Royal
1, Enfield
2, Harley
2, Davidson
];
I have also attached a working example.
You can get it done by using String aggregation functions
From reference manual..
Load Department, concat(Name,' ') as NameList from abc.csv group by Department
Load script like this should do the trick:
Data:
LOAD Bike_ID, Concat(Bike_Name, ' ', RecNo()) as Bike_Name GROUP BY Bike_ID;
LOAD * INLINE [
Bike_ID, Bike_Name
1, Royal
1, Enfield
2, Harley
2, Davidson
];
I have also attached a working example.
Hi Uday,
You can use Concat Command.
I have done it for you in attached .qvw document.
I hope it will help you.
Best Regards