- David Peace (Powersoft)
- PowerBuilder
- Wednesday, 13 May 2020 09:10 AM UTC
Hi Guys
Just a quick one as I suspect I know the answer really. I'm using the following code and getting an error saying that the Sql arguments are invalid or incomplete.
My simple reproducable is:
ls_sql = dw_1.GetSQLSelect ( )
ls_dw = sqlca.syntaxfromsql( ls_sql, 'Style(Type=Grid)', ls_err)
The DW on dw_1 is a simple single table DW and the GetSQLSelect returns:
PBSELECT( VERSION(400) TABLE(NAME="TestTable" ) COLUMN(NAME="TestTable.testkey") COLUMN(NAME="TestTable.testvalue") COLUMN(NAME="TestTable.testamount") COLUMN(NAME="TestTable.testdate")WHERE( EXP1 ="~"TestTable~".~"testvalue~"" OP ="like" EXP2 =":as_val" LOGIC ="or" ) WHERE( EXP1 ="~"TestTable~".~"testdate~"" OP ="=" EXP2 =":as_date" LOGIC ="or" ) WHERE( EXP1 ="~"TestTable~".~"testamount~"" OP ="=" EXP2 =":as_number" ) ) ARG(NAME = "as_val" TYPE = string) ARG(NAME = "as_date" TYPE = datetime) ARG(NAME = "as_number" TYPE = decimal)
My guess is that the SyntaxFromSql function was never designed to interpret a PBSELECT statement. Am I correct or have I screwed up somewhere?
I know that dw_1 is not connected to a DB which is why the GetSQlSelect returns the PBSELECT synatx. I just wanted to be sure that the SyntaxFromSql will never work this way.....
A quick yes it should work or no never will do, thanks :)
Cheers
David
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.