I am facing the problem with COMP variables in a string cmmand.For my requirement we are using Dynemic sql cursor for implementing a generic cursor. Here i am moving sql statements in to a String and used in cursoe diclaration.at same i am receving different where clause fields so i ahve mentined in a Evaluate sttement and set the flag for required string.This string contains the Where clause ofall fileds.
i have changed COMP variables in to edited variables bcz STRING is not accepting the COMP items,but at the time of cursor execution ai am gettin the SQL erro bcz DATABAS variable and WHERE clause variaable data types are differnrt.
Please tell me how can handle COMP variables ina string?
Joined: 20 Oct 2006 Posts: 6970 Location: porcelain throne
either use the reference name of the comp host variable in the where clause, or move your comp variable to a display field and string the display field - thus using a literal instead of host variable in the where clause.