Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select from unintended table
Message
De
04/04/2003 10:59:18
 
 
À
04/04/2003 10:46:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00773439
Message ID:
00774042
Vues:
12
>Hi,
>
>>Can you change this into 'select * from MyTable', ie without the mydbc!
>
>Thanks for the suggestion - that works. Guess I'll have to stay away from the view designer *and* ignore the documentation in this instance. Still odd (and I'd claim wrong) that VFP should make a different choice with the DBC name specified.
>
>Thanks again,
>Viv

Viv,

You are welcome.

As an aside, I never use the view designer and I code all my views. That way I can easily change the view by re-running the code. I have one function per view

It goes like this
Function MyView()
    
    =view_delete(program())

    create sql view program() as ;
      ;
    select * ;
       from MyTable1, MyTable2 ;
       where ( MyTable1.Id == MyTable2.Id ) ;
         and ( .... ) ;
     order by 1, 3, ..

    use in MyTable1
    use in MyTable2
endfunc
*--------
*--------------------------------------------------------------------------
function	view_delete(v)
	if( indbc( v, 'View' ) )
		delete view ( v )
	endif
endfunc
*---------------------------------------------------------------------------
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform