>Local ; >groupName as String , ; >tableAlias1 as String , ; >tmpCursor as String >groupName= 'a45' >tableAlias1 = "x"+Sys(2015) >outValue = 0 >Use "SecGroup" In 0 Alias ( tableAlias1 ) Again Shared >Select iiD from (tableAlias1) Where Lower(cGrpName) == Lower(groupName) into Cursor (tmpCursor) >>
>*Local ; >*groupName as String , ; >*tableAlias1 as String , ; >*tmpCursor as String >groupName= 'a45' >tableAlias1 = "x"+Sys(2015) >outValue = 0 >Use "SecGroup" In 0 Alias ( tableAlias1 ) Again Shared >Select iiD from (tableAlias1) Where Lower(cGrpName) == Lower(groupName) into Cursor (tmpCursor) >You get the error because defining a variable as LOCAL defaults it's value to a logical .F.. That's why your code below works fine, you've created the LOCAL variable tmpCursor, and then assigned it a character value, just as the SQL statement is expecting to find.
>Local ; >groupName as String , ; >tableAlias1 as String , ; >tmpCursor as String >groupName= 'a45' >tableAlias1 = "x"+Sys(2015) >tmpCursor = "t"+Sys(2015) >outValue = 0 >Use "SecGroup" In 0 Alias ( tableAlias1 ) Again Shared >Select iiD from (tableAlias1) Where Lower(cGrpName) == Lower(groupName) into Cursor (tmpCursor) >