Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append table
Message
From
27/10/2005 04:56:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Append table
Environment versions
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01062530
Message ID:
01062530
Views:
53
hi all,
any idea,help

i try to append mytable TO DATABASE( data1) via code under
  CLOSE all
SET TALK OFF
SET ECHO off
SET SAFETY off

GETDIR()
thisform.text1.Value=GETFILE()
thisform.text2.value ="am"
SET DEFAULT TO e:\depstudy
LOCAL am
am = thisform.text2.value  
CREATE TABLE &am(char1 C(10), char2 C(70),char3 C(10), char4 C(60),char5 C(10), char6 C(40),char7 C(40), char8 C(40),char9 c(10), char10 c(10),char11 C(10), char12 C(10),char13 C(70), char14 C(10),char15 C(10), char16 C(10),char17 C(10), char18 C(10),char19 C(40), char20 C(10),char21 C(10), char22 C(40),char23 C(10), char24 C(40),telno C(10), char26 C(70),char27 C(10), char28 C(10),char29 C(10),char30 C(30) NOCPTRANS)
IF (thisform.text1.value)>SPACE(10)

APPEND FROM (thisform.text1.value)  TYPE XLS 
     skip   && ONLY FIRST RECORD

use am exclusive
 index on val(char5) tag char5
 

select  sys(2015) as SortOrder,* from am ;
 order by 1 descending ;
 into cursor crsTemp nofilter


select am
zap
select crsTemp

scan
 if !seek(char5,'am','char5')
  scatter memvar memo
  insert into am from memvar
 endif
endscan


Select * from am ;
 where inList( upper(allt(char2)), "Óßäí ") ;
   into table am2 nofilter
  

CLOSE all
USE am2
 index on (telno) TO kk ascending

SET DEFAULT TO "\\cctfil01\hrd-spdata\SMD\Projects\Customer satisfaction Measurments\1214 Call Center Satisfaction\2005 1214 Servcie II\customer database\Treated data"

=MESSAGEBOX("Pl's Rename The Home Sheet  ")
gcDelimName = ALIAS( ) + '.xls'
gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls')
IF EMPTY(gcDelimFile)  
   Return
ENDIF


  COPY TO (gcDelimFile) XLS
     DROP TABLE am 
     DROP TABLE am2
     =MESSAGEBOX("DON")
ELSE
    =MESSAGEBOX("NO CHOICE")
    CLEAR EVENTS
ENDIF

SET DEFAULT TO e:\depstudy
THISFORM.Release
RELEASE ALL
****quit
THANKS
Next
Reply
Map
View

Click here to load this message in the networking platform