Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Tore Bleken
  Where is Tore Bleken?
 Stokke
 Norway
 Tore Bleken
 To: Peter Dzuya
  Where is Peter Dzuya?
 Mombasa
 Montana - Kenya
 Peter Dzuya
 Tags
Subject: RE: Creating Cursor with Fields from Table
Thread ID: 373801 Message ID: 373804 # Views: 49 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Wednesday, March 27, 2013 9:36:37 AM         
   


> >
> > Select * from yoursource where .F. into cursor yourcursor readwrite
>
>
>
>
> Won't I be getting the contents of The table 'City' In MyCursor. What I need Is, to create Mycursor using 'Mombasa','Nairobi','Kisumu' as Field names from The Table 'City'.
>
> Regards
> Peter Dzuya

I don't quite understand what you want. Anyway, you can rename a field by adding "as", for instance
Select field1, field2 as somename, field3 as somename2 from yourtable into cursor somename readwrite

Or you can add fields using cast
Select field1, field2 as somename, cast(''as c(25)) as somename2, cast(0 as n(12,2)) as somename3 from yourtable into cursor somename readwrite


ENTIRE THREAD

Creating Cursor with Fields from Table Posted by Peter Dzuya @ 3/27/2013 8:18:40 AM
RE: Creating Cursor with Fields from Table Posted by Tore Bleken @ 3/27/2013 8:24:22 AM
RE: Creating Cursor with Fields from Table Posted by Peter Dzuya @ 3/27/2013 9:31:18 AM
RE: Creating Cursor with Fields from Table Posted by Tore Bleken @ 3/27/2013 9:36:37 AM
RE: Creating Cursor with Fields from Table Posted by Peter Dzuya @ 3/27/2013 10:08:05 AM
RE: Creating Cursor with Fields from Table Posted by Jun Tangunan @ 3/27/2013 11:39:05 PM
RE: Creating Cursor with Fields from Table Posted by Vladimir Radjenovic @ 3/27/2013 10:05:47 AM
RE: Creating Cursor with Fields from Table Posted by Peter Dzuya @ 3/27/2013 10:25:37 AM
RE: Creating Cursor with Fields from Table Posted by Cetin Basoz @ 3/27/2013 10:24:20 AM
RE: Creating Cursor with Fields from Table Posted by Peter Dzuya @ 3/27/2013 10:39:22 AM