Board index » delphi » SYBASE: select into

SYBASE: select into

Does anybody know, how to execute the following command for SYBASE in
Delphi:

Select *
into #temp_table
from ...

It runs from interactive SQL, but Delphi returns an error.

 

Re:SYBASE: select into


what kind of a problem are you getting ?
Quote
Vit <v...@lemm.ru> wrote in message news:85mij4$8lh14@bornews.borland.com...
> Does anybody know, how to execute the following command for SYBASE in
> Delphi:

> Select *
> into #temp_table
> from ...

> It runs from interactive SQL, but Delphi returns an error.

Re:SYBASE: select into


Quote
Vit wrote:
> Does anybody know, how to execute the following command for SYBASE in
> Delphi:

> Select *
> into #temp_table
> from ...

> It runs from interactive SQL, but Delphi returns an error.

I'm not sure about this, but I had the same problem ( select * into ...
did not work on Sybase) and I managed to get around this by using

SELECT col1, col2, ... INTO ...

where col? are all the colums of the original table. The colum-names are
extracted from the FieldDefs in a TQuery, so I don't have to manually
enter each name.

Hope this helps!

Re:SYBASE: select into


Vit,

Try:

/**/Select *
into #temp_table
from ...

and! Query.ExecSQL

Ralph.

Vit <v...@lemm.ru> schreef in berichtnieuws
85mij4$8l...@bornews.borland.com...

Quote
> Does anybody know, how to execute the following command for SYBASE in
> Delphi:

> Select *
> into #temp_table
> from ...

> It runs from interactive SQL, but Delphi returns an error.

Re:SYBASE: select into


Quote
> /**/Select *

Thaks a lot! How stupid I am! :-)

Other Threads