Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table View
Message
De
22/01/2010 13:42:22
 
 
À
22/01/2010 13:35:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01445042
Message ID:
01445522
Vues:
23
>>>>>>>
>>>>>>>ok ok if you have a table with three names how would you get them to show simultaneously in 3 text boxes
>>>>>>
>>>>>>One last time.
>>>>>>
>>>>>>select T1.Name as Name1, T2.Name as Name2, T3.Name as Name3 from Table T1, Table T2, Table T3 where T1.ID = 1 and T2.ID = 2 and T3.ID = 3
>>>>>>
>>>>>>quick, though not very efficient way.
>>>>>
>>>>>i dont understnad this
>>>>>T1 ,T2, and T3 are tables..
>>>>>
>>>>>T1.Name as Name1&& name1 is a text box
>>>>>T2.Name as Name2,
>>>>>T3.Name as Name3
>>>>>
>>>>>
>>>>>T2 and T3 why? i dont know where it comes from and only T1 is a table
>>>>>and the select is saying select T2.name as name i dont follow this please explain
>>>>
>>>>T1, T2 and T3 are references to the same table. Naomi is using 'Table' as the name of the table which may have confused you. Assuming the table was named "Test" then:
SELECT T1.Name as Name1, T2.Name as Name2, T3.Name as Name3 FROM Test T1,Test T2, Test T3 WHERE T1.ID=1 AND T2.ID=2 AND T3.ID=3
>>>
>>>
>>>ok so is ID like the number of the table?
>>
>>Sorry, I haven't looked at the whole thread. My assumption is that Naomi expects the table to look like this:
CREATE TABLE Test (ID int, Name C(20))
>>INSERT INTO Test (Id,Name) VALUES(1,"Tom")
>>INSERT INTO Test (Id,Name) VALUES (2,"Dick")
>>INSERT INTO Test (Id,Name) VALUES (3,"Harry")
>
>well no i have a view that gets 3 names and i show them when i load the form.
>
>what you said previously looks cool i get it
>i have and ID problem is i cant used it like that cause it differs

OK - show use *your* data and maybe we can tell you how to extract what you need.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform