SELECT INTO using ADO and Foxpro tables
I think the INTO clause can appear just about anywhere - a collegue
always puts it at the very end of an SQL statement. ADO seems to use
the underlying database's syntax i.e. Fox's because it's throws up an
error if I miss out the word TABLE.
Anyway I can't get it to work. But CREATE TABLE does work (another
example of Fox syntax I accidently spelt CREATE as CREAT and it still
worked) although it doesn't put the table in the current database
folder, oh no, it puts it in the application folder which since I was
running in the IDE was ...\program files\Microsoft visual studio\vb98
so it took me a while before I realised that the table was actually
being created. Dog's dinner springs to mind.
Thanks for the help
Matthew
Quote:
> >Your syntax doesn't work. I'm not using the Jet provider but the
OLEDB
> >provider for ODBC databases. So I'm not trying to export data to an
> >external database but create a new table in the current one.
> It's not my syntax, it's Microsoft's! Seems like they changed their
> minds again about their own language... what's that, doesn't Microsoft
> own SQL?? <g>
> Creating a table _should_ use the same syntax without the IN clause:
> SELECT MyField1, MyField2 INTO NewTable
> FROM OldTable
> WHERE MyCriterion = TRUE;
> I think that the INTO does have to appear before the FROM though?
> Tim F
> --
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.