I have 2 columns having date data and time data. Now, is there any way to join these two columns ?
Hi Abhishekg,
May I know the database name ?
Regards,
Helical Insight Team
I am currently using MySQL database.
Thank you Abhishekg for sharing database details.
In case of MySQL, to join the two columns there are two ways to achieve it :
- Using Concat Function : concat(col1, col2)
- Using Custom Column
Method1 : Using concat function
format : concat(col1, col2)
To apply concat function following are the steps:
- Insert required column in selection panel
- Click on dragged column and select “More” from the option
- Go to Advance Tab
- Insert Concat function from the list
- Insert col1, col2
- Click OK and then generate report to view report.
Note: Insert all the columns in selection panel so that these column is available in the “Available Column” list of Advance Tab for applying concatenation.
Method2 : Using Custom Column
To apply concat function using custom column, you need to enter the code manually.
Code :
concat(col1, col2)
Note: If you are using a column from a table in the code then one or more has to be present in the selection panel for reference purpose.
For example : col1, col2 belongs to same table then atleast one of them (either col1 or col2) should be present in the selection panel of adhoc
Please feel free to reply in case of any issue.
Regards,
Helical Insight Team
This actually works and very easy to do but I want space in between my col1 and col2 data. how can i do that?
Hello Shikha,
You can create a custom column and within custom column, you can write CONCAT function.
For space you can apply blank ’ ’ in between your columns like below :
CONCAT (firstcolumnName, ’ ', lastcolumnName)
Thank you