insert as select does not work with parameters mapping
See original GitHub issueCrateDB version: 4.2.6
Problem description: Mapping parameters for prepared SQL statement failed for insert-as-select query
Steps to reproduce:
create table test (x int)
Table TEST created.
select x from test where x = :param
(and set :param to any value)
ok
insert into test (x) select x from test where x = 123
ok
insert into test (x) select x from test where x = :param
(and set :param to any value)
SQL Error: Индекс колонки вне диапазона: 1. Допустимые значения: 1..0
(Column index out of range: 1. Valid values: 1..0
- sorry, I dont know how to change language to engish)
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
INSERT INTO SELECT statement overview and examples
We can map the column between the source and destination table using the following query.
Read more >EXECUTE SQL parameters mapping problem
I Have EXECUTE SQL Task and I am trying to insert some data into table with syntax: "INSERT INTO test. SELECT ?" Parameter...
Read more >How to make an insert with a combination of a select and ...
I have a stored function which receives a number of parameters. Within the function, I need to INSERT a row into a table...
Read more >URL Actions - Tableau Help
Create an email with a URL action · Deselect Encode Data Values that URLs Do Not Support · Select Allow Multiple Values via...
Read more >INSERT INTO Statement | ClickHouse Docs
If a list of columns does not include all existing columns, ... must be specified in the end of query if SELECT clause...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mfussenegger I using wrapper for JDBC (similar to JDBCTemplate) All parameters there passed using
?
My SQL looks like a (sorry - it was minor issue for me, there was more important problems, and I forget to save original SQL. At now I cant found it in logs)
And this request executes via
I tryed to reproduce this now - and all works fine … Maybe it related to #10650 ? I dont know. In about a week I will try to reproduce #10650 on test cluster, and I will check this also.
Sorry for disturbing
@shm-dmitry thank you for the updated test case. We came up with a fix (https://github.com/crate/crate/pull/10742) which will be released with 4.3.2