please help!
TIA
INSERT INTO customer VALUES ("val1","val2",5,...,"val40")
Fred
Microsoft Visual FoxPro MVP
"Joriz" <goo...@joriz.is-a-geek.net> wrote in message
news:7d49ea6b.04032...@posting.google.com...
> into customer (f1..) values (m.f1..), it takes a lot of coding to
> enumerate all fields. Is there a fastest way to do this? something
> like sqlexec("dsn", insert into customer from memvar) ..
>
> please help!
>
> TIA
--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
^ ^ 9:38pm up 2 days 13:42 load average: 1.00 1.00 1.00
Samir R. Ibrahim
"Joriz" <goo...@joriz.is-a-geek.net> wrote in message
news:7d49ea6b.04032...@posting.google.com...
x = CHRTRAN(TRIM(x)," ",",")
y= CHRTRAN(TRIM(y)," ",",")
TEXT TO sql NoSHOW TextMerge
INSERT INTO Table (<<y>>) VALUES (<<x>>)
ENDTEXT
* ? sql
SCAN
SCATTER MEMVAR
SQLEXEC( handle, sql)
ENDSCAN
Ok for smallish jobs. For bigger tables, appending from a textfile is
faster:
#Define TAB '\t'
#Define LF '\n'
?SQLEXEC(handle,[BULK INSERT SQLServerTable FROM "myTable.TXT" WITH
;(DATAFILETYPE='char',FIELDTERMINATOR=TAB,ROWTERMINATOR=LF)])
-Anders
"Joriz" <goo...@joriz.is-a-geek.net> wrote in message
news:7d49ea6b.04032...@posting.google.com...
~MK
"Joriz" <goo...@joriz.is-a-geek.net> wrote in message
news:7d49ea6b.04032...@posting.google.com...
and actually its not only 40 fields..its about 138 fields the most. I
had a few bumps putting them all in one string. Its just way too long.
I just created a table with memo fields that will contain my entire
insert statement.
thanks again for all your suggestions.
"news.comcast.giganews.com" <kjh...@jhg.las> wrote in message news:<zqmdnRtgyNs...@comcast.com>...