Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add records
Message
From
25/08/2004 06:45:43
 
 
To
25/08/2004 02:27:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00935865
Message ID:
00936245
Views:
29
INSERT INTO doesnt support the FROM clause. Try this instead:
USE Toto IN 0

FOR I = 1 TO THISFORM.Test8.Value
    INSERT INTO Toto (char1,char2,char3) VALUES (Newamar66.char1, Newamar66.char2, Newamar66.char3)

*    INSERT INTO Toto (all fields) VALUES (allfields from Newamar66)
    *-- Here you can either specify all the fields like this:
    INSERT INTO Toto (Char1, Char2, Char3, ...) VALUES (Newamar66.Char1, Newamar66.Char2, Newamar66.Char3, ...)
    *-- or
    INSERT INTO Toto VALUES (Newamar66.Char1, Newamar66.Char2, Newamar66.Char3, ...)

    *-- If the field names are identical, you can use this:

    SELECT Newamar66
    SCATTER NAME oData
    INSERT INTO Toto FROM NAME oData
ENDFOR
HTH

>i'll try to change but i get error message(syntax error),
>
>how i can insert a fields i choice as char1,char2....,and if i want insert all field becuse
> fields at table1=fields at table2.
>USE Toto IN 0
>
>FOR I = 1 TO THISFORM.Test8.Value
> *  INSERT INTO Toto (<Field list>) VALUES (<Fields from Newamar66>)
>    INSERT INTO Toto (char1,char2,char3) VALUES (char1,char2,char3 from Newamar66)
>    INSERT INTO Toto (all fields) VALUES (allfields from Newamar66)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform