Mathew,
Creating extra variable is not necessary and clutters your code. If you will always have selection and order clauses, the expression can be simplified to: PRINT &vReportName WHERE &vReportWhere ORDER BY &vReportOrderBy OPTION SCREEN Javier, Javier Valencia, PE O: 913-829-0888 H: 913-397-9605 C: 913-915-3137 From: [email protected] [mailto:[email protected]] On Behalf Of Matthew Brock Sent: Monday, March 17, 2014 12:36 PM To: RBASE-L Mailing List Subject: [RBASE-L] - concat variables I am trying to print using variables and can not get it to work. I am sending in variables SET VAR vReportWhere = 'Item_Number = 100' SET VAR vReportName = 'IM_ALL_1' SET VAR vReportOrderBy = 'Item_Number' Then i set new variables based on the above SET VAR vWhereClause = ' WHERE ' + .vReportWhere + ' ' SET VAR vOrderBy = ' ORDER BY ' + .vReportOrderBy' + ' ASC ' Then i try and call a PRINT command PRINT .vReportName .vWhereClause .vOrderBy OPTION SCREEN I have tried putting + which is not suppose to add a space I have tried putting & which is suppose to add a space Still nothing works unless i try PRINT IM_ALL_1 WHERE Item_Number = 100 ORDER BY Item_Number ASC OPTION SCREEN Where is my syntax wrong? Thanks, Matthew D. Brock

