Thanks Paul,

but I already tried with a FETCH (see the code below)
and I get always the same Message "Variable or Field poscp.Obj not defined"

Regards,

Michel Van Asten


Run Command "Select Obj, Pc4_code FROM CP WHERE Pc4_code in (SELECT CP FROM
POS WHERE POS = " + dpos.CodePOS + ") into poscp"
Note "Code : " + Str$( poscp.Pc4_code )

Fetch First From poscp
Do While Not EOT(poscp)
        Note "OK"
        Insert Into SDEST (Obj, posid, edcode, label) Values( poscp.Obj,
dpos.CodePOS,-1, dpos.CodePOS)
        Fetch Next From poscp
Loop


-----Message d'origine-----
De : CRISP, Paul -Syntegra UK [mailto:[EMAIL PROTECTED]
Envoy� : jeudi 10 juillet 2003 12:01
� : [EMAIL PROTECTED]
Objet : RE: MI-L Map Basic Insert


Michel

Its a point worth making that MapInfo is not a DBMS, it just has a
relational data structure. As a result, while you can do a lot with SQL you
will run into limitations that you never encounter in Oracle, Access etc.

That said - in your example you'll need to FETCH a row to get an unambiguous
value for poscp.Obj

You're probably best to loop your result set using FETCH and retrieve the
values using alias variables - insert one row at a time - then commit when
you're done.

Paul Crisp

Syntegra
Innovation Place Delta Bank Road Newcastle NE11 9DJ
Tel 0191 461 4522 Fax 0191 460 1987


-----Original Message-----
From: michel Van Asten [mailto:[EMAIL PROTECTED]
Sent: 10 July 2003 10:55
To: [EMAIL PROTECTED]
Subject: MI-L Map Basic Insert


Hi,

I need to copy some features of one table and insert them in an other one...
I got an error on the last line of the code below...

Is it the right way to achieve this goal ?

Run Command "Select Obj, Pc4_code FROM CP WHERE Pc4_code in (SELECT CP FROM
POS WHERE POS = " + dpos.CodePOS + ") into poscp"

Note "step2"     Note "Code : " + Str$( poscp.Pc4_code )


Insert Into SDEST (Obj, posid, edcode, label) Values( poscp.Obj,
dpos.CodePOS,-1, dpos.CodePOS)

Regards,

Michel Van Asten
Projections SPRL


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 7576


********************************************************************

This email may contain information which is privileged or confidential. If
you are not the intended recipient of this email, please notify the sender
immediately and delete it without reading, copying, storing, forwarding or
disclosing its contents to any other person
Thank you

Check us out at http://www.syntegra.com

********************************************************************


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 7577


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 7583

Reply via email to