Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scatter Gather problem
Message
From
04/05/2004 05:42:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00900498
Message ID:
00900626
Views:
19
>In response to your comments it's still a lot of typing with 250 fields but you suggestions would save some typing.
>
>Regards,
>Torrey

No it's not a lot of typing, you only need to edit ones with shortnames. ie:

use Source
copy structure extended to myMapper
use myMapper
browse

Or :
Edit your longtablename one to have shortnames in comment field for the ones that need different naming. Afields() would then have necessary mapping info.

Or :
With a select rename fields on the fly ...

Or :
Set fields global
Set fields to ShrtName1 = LongName1, ....

Or :
CursorToXML()
strtran(...)
XMLToCursor()

Or (VFP8):
insert into Target (shrt1,shrt2...) from (select long1,long2,.... )

Or let VFP type most of it for you :
m.MySource = 'SourceTable'
m.myTarget = 'TargetTable'
Select(m.mySource)
set textmerge to memvar m.lcFieldsLong noshow
set textmerge on
\\replace ;
for ix = 1 to fcount()
 \   <<m.myTarget>>.<<field(m.ix)>> with <<m.mySource>>.<<field(m.ix)>>, ;
endfor
\ in '<<m.myTarget>>'
set textmerge to
set textmerge off
_cliptext = m.lcFieldsLong
Or and or and or .... < bg >

Even if it's a lot of typing it's a one time work.

And yet for an alternative (drag&drop) check FoxyClasses importer.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform