- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How to concatenate variables?
Hello, is there a way to concatenate variables like you do in Excel? Say I want to do year(column_name) &" -"& floor(field_name)? I am trying this for a new column I created and i wanted to input a similar formula
Thanks
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to concatenate variables?
The string concatenation operator is two vertical bars: ||
Note that if you want to concatenate a number you have to convert it to a character string first, using the CHAR() function. So your example would be:
char(year(column_name)) || "-" || char(floor(field_name))
If your table has columns called column_name and field_name, then a column formula would be:
char(year(:column_name)) || "-" || char(floor(:field_name))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to concatenate variables?
The string concatenation operator is two vertical bars: ||
Note that if you want to concatenate a number you have to convert it to a character string first, using the CHAR() function. So your example would be:
char(year(column_name)) || "-" || char(floor(field_name))
If your table has columns called column_name and field_name, then a column formula would be:
char(year(:column_name)) || "-" || char(floor(:field_name))