Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10548

Re: CREATE TABLE ... AS SELECT query with placeholders fails

$
0
0

Well, again, the WITH DATA clause is wrong in your code.

It belongs to the CREATE TABLE LIKE command - not to the CREATE TABLE AS command.

 

Anyhow, I tested this with correct syntax and it still fails with the wrong number of parameters error. For now you have to create the table structure first and insert the data in a second step.

 

The other thing is: if you just want to refer to the result set later on, it's much better to use table variables instead of temp. tables.

 

- Lars


Viewing all articles
Browse latest Browse all 10548

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>