Reply from Wilt_the_Stilt on Jun 24 at 11:25 PM Thanks guys this helped resolve my current issues.
| | | ---------------Original Message--------------- From: Unknown User Sent: Wednesday, February 26, 2003 9:28 AM Subject: problem with sqlexec containing Like and bind variable In PeopleTools 8.18, I want to execute via SQLExec a SQL statement of the form (pseudocode) SELECT field FROM table WHERE field LIKE [variable]% (end pseudocode) I have tried the following, all with errors: SqlExec( "SELECT field FROM table WHERE field LIKE :1%", &variable ) ; SqlExec( "SELECT field FROM table WHERE field LIKE ':1%'", &variable ) ; SqlExec( "SELECT field FROM table WHERE field LIKE :1", &variable ) ; <-this executes, but does not return correct results. SqlExec( "SELECT field FROM table WHERE field LIKE :1", &variablelike ) ; <- where &variablelike = &variable | "%" ; SqlExec( "SELECT field FROM table WHERE field %Like(:1)", &variable ) ; SqlExec( ExpandSQLBinds("SELECT field FROM table WHERE field %Like(:1)", &variable) ) ; None of these work correctly. Most either give a pop-up box saying SQLExec failed, or they cause the application to jump straight to "An error has occurred, please sign in again." This doesn't seem like anything groundbreaking, so I'm just missing something simple. How do I execute a SQL statement with a LIKE clause in it? Thanks, Jay | | Reply to this email to post your response. __.____._ | _.____.__ |
No comments:
Post a Comment