The variable is nowhere near the max, but your string literal is. String literals can only be 255 characters.
You'll need to break it up by doing something like:
mysql = "Select X.oname,X.tblname,X.ftype,X.fwidth,X.fdecplaces," + ;
"X.fnullvalues,X.fdefval,Y.objectname,Y.objecttype," + ;
"Y.fwidth, Y.fdecplaces, Y.fnullvalues, Y.fdefval " + ;
"FROM description X, metadescription Y where X.oname=Y.objectname " + ;
"and X.objcateg=Y.objcateg and X.objcateg='Field'"
You don't really need to break it up that finely, but you get the idea.
Alan
>I am trying to create a view by running the code below. Then I will use CREATE SQL VIEW AS &mysql to create the view.
>
>mysql="SELECT X.oname,X.tblname,X.ftype,X.fwidth,X.fdecplaces,X.fnullvalues,X.fdefval,Y.objectname,Y.objecttype, ;
>Y.fwidth, Y.fdecplaces, Y.fnullvalues, Y.fdefval FROM description X, metadescription Y where X.oname=Y.objectname ;
>and X.objcateg=Y.objcateg and X.objcateg='Field'"
>
>However, I am getting an error "Command contains unrecognized phrase/keyword" everytime I add the last condition which is "X.objcateg='Field'". If I remove it, VFP accepts the sttmt. Is there any limit with the number of characters that a temporary variable can hold in this case?
>
>Thanks a lot for your help.
>
>Nerissa