Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I don't know how to create a query

Status
Not open for further replies.

Dpac

Programmer
May 29, 2001
6
0
0
GB
I have just started foxpro , I can't seem to be able to create queries . I currently use a scan..endscan function and a lot of tables to get information out of a table . Could somebody provide info on how to use it . I current;y use 2.6 . If this involves relating tables a little help on that would also be appriciated .
 
Hello...
Just have a look into the SQL SELECT statements help.. you can create a table with data populated from multiple files very easily.. Little effort will get you into this eaasily. The resulting CURSOR can be easily cast into you needed report or browse window...
Example 1
Select field1, field2, .. , FROM myTable ;
INTO CURSOR myCursor WHERE myFilterConditions

Example 2
Select db1.field1, db1,field2, db2.field1, .. , ;
FROM myTable INTO CURSOR myCursor ;
WHERE db1.field1=db2.field2 etc matching conditions ;
.AND. myFilterConditions wtc..

This is so easy once you get into it.

Best of luck ! ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
 
Hi;

A good way to learn is to use "create query" from the command window.
Select a table then navigate the various options (order by, group by, etc.)
then select 'View SQL' and look at the code you generated. You can even copy and paste the code into your program if you want.

Hope this helps...

Ed

Sometimes you're the windshield... Sometimes you're the bug.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top