Hola Tocayo,
It's been a while. Hope you're doing fine!!!
I've found macro substitution to be quirky (or maybe after all these years, I still haven't gotten the hang of it). In order to simplify things, I tend to substitute the whole line and execute that as a macro. For example:
lcCommand = "create sql view " + lcVista + " as " + lcView
&lcCommand
There's a chance too that what you need is create sql view (lcVista) as (lcView) or something along those lines.
Naomi's idea yields a similar result.
Let us know if that solves the problem.
Alex
>A dbc defines remote views into a Pervasive database. Some of the views bring all records and some are filtered.
>
>In order to speed up a process I want to create a snapshot of the Pervasive database with unfiltered views coming over as dbf tables and filtered views coming over as filtered views of the dbf tables.
>
>There is no problem creating tables representing unfiltered views, but the filtered views are simply not created. The TRY does not fail.
>
>
>* A cursor with all views in original DBC is open in current area. Filtered views have an underline in name.
>SCAN FOR '_' $ ObjectName
> lcVista = ALLTRIM(ObjectName)
> lcTabla = lcVista
> SET DATABASE TO DacIlsa
> lcSelect = STREXTRACT(property,'SELECT',CHR(0),1,1+2+4)
> lcSelect = LEFT(lcSelect,LEN(lcSelect) - 1)
> TRY
> * The following command does NOT create the view, yet the TRY continues to lcMensaje = 'message that indicates success'
> CREATE SQL VIEW &lcVista AS &lcSelect
> lcMensaje = 'message that indicates success'
> STRTOFILE(lcMensaje,LogFIle.log',.T.)
> CATCH TO loError
> lcMensaje = 'Message that indicates failure'
> STRTOFILE(lcMensaje,LogFile.log',.T.)
> ENDTRY
>ENDSCAN
>
>
>
>What might be problem?
>
>TIA,
>
>Alex
Low-carb diet not working? Try the Low-food diet instead!