Stored Procedures-MSS

psepesi

New Member
I'm trying to create a temp table from an SQL database using a stored procedure (Load-Result-Into).
Using the send-sql-statement with the proc-text buffer is working fine.
However when I try to introduce the load-result-into, I get the most common and annoying syntax error, could not under stand after......

I am using a cast expresstion with my select statement...

Code looks like: Using 9.1D, with Enterprise DataServer MSS


def var tt-1 as handle.
def temp-table custinfo
field ci-1 as char
field ci-2 as char.

assign tt-1 = temp-table custinfo:handle.

run stored-proc send-sql-statement load-result-into tt-1
("select cast (field1 as varchar),
cast (field2 as varchar)
from filename").

Any help appreciated!!
 
Back
Top