>text to lcView textmerge noshow > create SQL view <<lcVista>> as <<lcSelect>> >endtext >_cliptext = lcView >&lcView >>
>>* 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 > >>>>