Error while concatenating fields
Answered
HI TEam,
I am trying concatenate more than 2 fields in a report via free hand SQL. But I am getting the below error.
I can concatenate same fields in Database (MySQL) without any error
Hi Chetan,
I believe this is occurring because the syntax is incorrect:
Also, if these are two fields that exist in YF, why not just use the Simple formula type?
Regards,
Mike
Hi Chetan,
I believe this is occurring because the syntax is incorrect:
Also, if these are two fields that exist in YF, why not just use the Simple formula type?
Regards,
Mike
Hi Mike,
Its not issue with the syntax as I tried with all possibilities. Cant use simple or pre-defined formulas as I have 5 fields to concatenate.
Hi Mike,
Its not issue with the syntax as I tried with all possibilities. Cant use simple or pre-defined formulas as I have 5 fields to concatenate.
Hi Chetan,
It appears the issue is that YF believes these values belong in a table called 'reportDemo2.questions'. If the column wasn't recognized by YF at all, it would show up as:
Rather than what your instance is saying. Does the corresponding table contain these fields in your database? If these fields are contained in a different table than the one you're working in in your report, then prepend your table name to the query like so:
Please let me know how this goes.
Regards,
Mike
Hi Chetan,
It appears the issue is that YF believes these values belong in a table called 'reportDemo2.questions'. If the column wasn't recognized by YF at all, it would show up as:
Rather than what your instance is saying. Does the corresponding table contain these fields in your database? If these fields are contained in a different table than the one you're working in in your report, then prepend your table name to the query like so:
Please let me know how this goes.
Regards,
Mike
Hi Mike,
Yes, Table contact contains all the fields which I need to concatenate.
Tried as suggested above but still I am getting the same error.
However I can concat the same two fields by using predefined concatenate function without any error.
PS. I need to concatenate 5 fields here. All the fields belong to same table of a master view.
Thanks,
Chetan
Hi Mike,
Yes, Table contact contains all the fields which I need to concatenate.
Tried as suggested above but still I am getting the same error.
However I can concat the same two fields by using predefined concatenate function without any error.
PS. I need to concatenate 5 fields here. All the fields belong to same table of a master view.
Thanks,
Chetan
Hi Chetan,
Thanks for the response. Can you please attempt 'Contact.Street'+'Contact.Street2' rather than without single quotes? My previous example doesn't work without the single quotes either, for instance. Also please note that when using Freehand SQL you are actually querying the database and not a View within Yellowfin, so it's important to make sure 'Contact' is your actual table name in the db, if you haven't already done so.
Regards,
Mike
Hi Chetan,
Thanks for the response. Can you please attempt 'Contact.Street'+'Contact.Street2' rather than without single quotes? My previous example doesn't work without the single quotes either, for instance. Also please note that when using Freehand SQL you are actually querying the database and not a View within Yellowfin, so it's important to make sure 'Contact' is your actual table name in the db, if you haven't already done so.
Regards,
Mike
Hi Mike,
Thanks for help. I am able to concatenate the fields now.
But when use this field in report it's coming up in numeric values. Thats strange!
Am I missing something?
Thanks,
Chetan
Hi Mike,
Thanks for help. I am able to concatenate the fields now.
But when use this field in report it's coming up in numeric values. Thats strange!
Am I missing something?
Thanks,
Chetan
Hi Chetan,
This depends on which RDBMS you're using. You can reference this article on how to accomplish this: https://www.sqlbook.com/sql-string-functions/sql-concatenate/
In MySQL and Oracle, the script is:
As an example. I added , " ", to put a space between values:Please reference linked article and let me know if you have any further questions.
Regards,
Mike
Hi Chetan,
This depends on which RDBMS you're using. You can reference this article on how to accomplish this: https://www.sqlbook.com/sql-string-functions/sql-concatenate/
In MySQL and Oracle, the script is:
As an example. I added , " ", to put a space between values:Please reference linked article and let me know if you have any further questions.
Regards,
Mike
Hi Chetan,
I'm going to go ahead and mark this one as Answered, but if you have further questions or concerns on this, if you respond, it will re-open the case and put it back in my queue and I'll be happy to help.
Regards,
Mike
Hi Chetan,
I'm going to go ahead and mark this one as Answered, but if you have further questions or concerns on this, if you respond, it will re-open the case and put it back in my queue and I'll be happy to help.
Regards,
Mike
Replies have been locked on this page!