Getting db2 error: ibm_db_dbi::ProgrammingError: The last call to execute did not produce any result set - db2

We installed Superset in our development environment and trying to display data in reports format. Reports will be generated form DB2 Database. I am able to access reports properly and i can execute select statements without any issues.
Along with reports, we need to create few tables also. So we created a user with necessary permissions. When I tried to create a table from Superset I am getting the following error message. Same query is working fine from DBeaver (where I connected to the same database with same user name).
Any suggestions/ideas on what I can try?
db2 error:
ibm_db_dbi::ProgrammingError: The last call to execute did not produce
any result set.
Query: MSACCESS is the schema where I am creating MMR1 Table
CREATE TABLE MSACCESS.MMR1(
zip_code VARCHAR(6)
);
Below statement should create a table . Userid has necessary permissions
CREATE TABLE MSACCESS.MMR1(
zip_code VARCHAR(6)
);

Related

Getting Mapping error in OLE DB Destination when use SQL Command under Data Access Mode

I am working SSIS integration using Visual Studio 2017. I have tested 'Data Access Mode' Table Or View which did work. Now I need to filter data and I am trying to use 'Data Access Mode' SQL Command and getting Mapping issue in OLE DB Destination Editor.
In Destination Data outsource, I use OLE DB Destination and under 'Component Properties' SQL Command I type following script
INSERT INTO User_Filtered
(UserGUID
,IdNum
,FirstName
,LastName
,Email
,PostCode)
VALUES
(?,?,?,?,?,?)
In mapping getting error
error
error at user dataflow [ole db destination] no column information was returned by the SQL Command
Under the OLD DB Source I typed following script under the SQL Command dataview, which seems fine
SELECT u.*
FROM [AnotherServer].[dbo].[Users] AS u
where [email] IS NOT NULL AND [org] IS NOT NULL
In the OLE DB Destination you only need to use a SELECT statement with the columns that will be inserted into, not an INSERT statement. After this you can map the columns on the Mappings page.

temp tables in postgresql

I'm coming from a background in SQL Server where I would create temp tables using the:
select id
into #test
from table A
I've just moved into a PostGresql environment and I was hoping I could do the same, but I'm getting a syntax error. I did a search and it seems like you have to do a Create Table statement.
Is it not possible to easily create temp tables in Postgres?
Postgres supports SELECT INTO, so this should work fine:
SELECT id
INTO TEMP TABLE test
FROM a
You can also use CREATE TABLE AS:
CREATE TEMP TABLE test AS
SELECT id FROM a
This version is generally preferred, as the CREATE statement provides additional options, and can also be used in PL/pgSQL functions (where the SELECT INTO syntax has been hijacked for variable assignment).

SignalR hub not working with existing tables

In the begining I have given service broker enable status to database on MSSQL 2008. I have two tables with same fields. First one is existing table. Other is created new by me. Hub is not working with first existing table, but works fine with other table which we create new.
Our select statement is basic and we have used only select field like 'select field1,field2 from Table1 where field2=1'.
I am using C#.
What kind of problem can be in this issue, how can we solve?
I have found solution. SignalR wants table scheame name in sql statement. Default scheme name is dbo and our sql or stored procedure include dbo. Like:
'Select field1,field2 from dbo.Table1 where field2=1'.

Back tick not working to escape "Order" in Google Cloud SQL

Is there some reason (maybe a setting) that Google Cloud SQL fails to escape "Order" when using back ticks, but does work on other reserved words?
In one instance of Google Cloud SQL, the following command is successful:
CREATE TABLE `Order`
(
Test CHAR(1) NULL
);
In a different instance, recently created under a new App Engine, I get the following error:
Error Code: 1005. Can't create table 'roms.Order' (errno: 150)
However, in the same instance, escaping "ORDER" or "order" does work to create table.
Thanks for any suggestions.
After I dropped and recreated the database, I was able to create the Order table.
The very first time I tried to create the Order table, there was failure (I believe a connection error). I am thinking the table was partially created and not rollback back properly after the failure. Causing any subsequent creation attempts to fail.
The table was never shown the schema and drop table did not work.

Table invisible in PostgreSQL - Undefined relation issue at different sessions

I have executed the following create statement using SQLWorkbench at my target postgresql database:
CREATE TABLE Config (
id serial PRIMARY KEY,
pub_ip_range_low varchar(100),
pub_ip_range_high varchar(100)
);
Right after table creation I request the table content by typing 'select * from config;' and see that table could be retrieved. Nevertheless, my java program that uses JDBC type 4 driver cannot access the table when I issue the same select statement in it. An exception is thrown when the program tries to access it which says says "Undefined relation" for the config table.
My questions are:
Why sqlworkbench where I had previously run the create statement recognizes the table while my java program cannot find it?
Where does the postgressql DBMS puts the tables I created? I don't see them neither in public nor in information schema.
NOTE:
I checked target postgres database and cannot see the table Config anywhere although SQL workbench can query it. Then I opened another SQL workbench instance and noticed that the table cannot be queried (i.e. not found). So, my conclusion is that PostgreSQL puts the table I created in the first running SQLBench instance into some location that is bound to that session. Another SQL Workbench instance or my java program is not bound to session, so cannot query the previously created table config.
The only "bloody location" that is session-local in PostgreSQL is the schema pg_temp, in other words: temporary tables. But your CREATE command does not display the keyword TEMP[ORARY]. Of course, as long as the transaction is not commited, nobody sees anything outside the transaction.
It's more likely you are seeing a switcheroo of hosts / databases / ports / or the schema search_path. A mixup with the mixed-case table name is a hot candidate, too. If you don't double-quote "Config", the table ends up all lower case in the system, so: config. If you later double quote the name, it won't match. The manual has the details.
Maybe the create failed on the extra trailing comma?
CREATE TABLE config (
id serial PRIMARY KEY,
pub_ip_range_low varchar(100),
pub_ip_range_high varchar(100) -- >> ,
);