Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CREATE SQL VIEW does not create a view
Message
From
04/01/2010 06:19:55
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01441820
Message ID:
01441870
Views:
27
Thank you for the response, Naomi.

The command was actually creating the view but I wasn't looking for it properly.

Alex

>Alex,
>
>Try
>
>text to lcView textmerge noshow
>   create SQL view <<lcVista>> as <<lcSelect>>
>endtext
>_cliptext = lcView
>&lcView
>
>
>This way it would be easier to spot a problem.
>
>
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform