Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Division to columns
Message
From
28/09/2005 07:05:29
 
 
To
28/09/2005 06:56:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01053818
Message ID:
01053830
Views:
8
>You code run, but it's not do nothing.
>crsr2 is empty.
create cursor crsr1(id i)
for i=1 to 10
    insert into crsr1 value(i)
endfor

create cursor crsr2(a c(1),b c(1),c c(1))

SELECT crsr1
lnTest = 0
lcInsert = "INSERT INTO Crsr2 VALUES (m.Val1, m.Val2, m.Val3)"
SCAN
  lnTest  = lnTest + 1
  m.TestV = "m.Val" + TRANSFORM(lnTest)
  &TestV  = TRANSFORM(Id)
  IF lnTest == 3
     &lcInsert
     lnTest  = 0
  ENDIF
ENDSCAN
SELECT Crsr2
BROW
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform