I expecting a query to select a ddbma (ppdm) plugin in ssms? - ssms

I cannot get how to select a ddbma plugin in ssms via query
I expecting a query to select a ddbma (ppdm) plugin in ssms ?

Related

executing sql query in UiPath to extract data from snowflake

I am using execute query activity in Uipath studio and writing the sql query like this
"select * from SNOWFLAKE_SAMPLE_DATA where value=CALL_CENTER"
to extract the table values from snowflake.
where "SNOWFLAKE_SAMPLE_DATA" is the database and "CALL_CENTER" is the table which is present in the said database.
After I execute the query in uipath it gives the following error:
Execute Query: ERROR [42S02] SQL compilation error: Object
'SNOWFLAKE_SAMPLE_DATA' does not exist or not authorized.
Any help in this regard will be highly appreciated.
Thank You
You will need to update your SQL query.
The correct syntax is SELECT * FROM [database.table];
If you want to pull everything from the table, you will need to enter the line below (in double quotes) in the Sql property of the Execute Query activity:
SELECT * FROM SNOWFLAKE_SAMPLE_DATA.CALL_CENTER;
Lastly, the output will need to go to a data table.

SQL where clause parameterization

I am trying to parameterize certain where clauses to standardized my Postgres SQL scripts for DB monitoring. But have not found a solution that will allow me to have the following script run successfully
variablename = "2021-04-08 00:00:00"
select * from table1
where log_date > variablename;
select * from table2
where log_date > variablename;
Ideally, I would be able to run each script separately, but being able to find/replace the variable line would go a long way for productivity.
Edit: I am currently using DBeaver to run my scripts
To do this in DBeaver I figured out you can use Dynamic Parameter Bindings feature.
https://github.com/dbeaver/dbeaver/wiki/SQL-Execution#dynamic-parameter-bindings
Here is a quick visual demo of how to use it:
https://twitter.com/dbeaver_news/status/1085222860841512960?lang=en
select * from table1
where log_date > :variablename;
When executing the query DBeaver will prompt you for the value desired and remember it when running another query.

Unable to run two separate select statements Oracle / Toad ORA-00933

I'm coming from a MS SQL background using SSMS. I just recently started using Oracle / Toad at a new company and I'm finding it to be a bit finicky.
One of the things that I use to do in SSMS was select 2 queries, and then execute the statement and see the results for both.
When I attempt to run the following queries
select count(*) from table1;
select count(*) from table2;
I get the following error message back: ORA-00933: SQL Command not properly ended
Is there something in particular that I'm not doing correct?
In your tool, hit F5, you'll get your results as a script for both queries.
In the free, official GUI for Oracle Database, you can do this:
As Barbaros Özhan notes, you'll need to fix your queries first. You need to do a count() on SOMETHING - * will work.
You need to include some literal like 'x', or a symbol like * or a number 1 inside count function like count(1) or count(*) or count('x').
In your case, one of these missing operators causes ORA-00933.
The answer apparently was the button that I was selecting in Toad for Oracle / slightly incorrect SQL statement.
I was hitting the "Execute / compile statement at caret" button instead of the "Execute Script As" button.
Selecting the wrong button in Toad

Run ODBC select statement from Management Studio

We have a linked server connecting to IBM iSeries server. Usually, it is no problem using the linked server. However, I came across a query that I can't run locally on Management studio because it is using IBM functions and grouping capabilities like:
Functions:
Trim
CVTDATE
Grouping in select statement (at field level), not in group by:
SELECT SUM(BOOKEDAMT('*CONACTIV', GLPDJC.GLDBK, GLPDJC.GLDPJ, GLPDJC.GLDEC1, GLPDJC.GLDRN1, GLPDJC.GLDJB, GLPDJC.GLDGL, GLPDJC.GLDCC, GLPDJC.GLDRN2, GLPDJC.GLDBT, GLPDJC.GLDBE, GLPDJC.GLDBL, 9, ((XCVTDATE(DATE (SUBSTRING({d '2017-06-30' }, 1, 10))))), GLPDJC.GLDEDT))
,field2
,field3
FROM .....
GROUP BY field2 field3
Question: How do I run this query locally? Is it possible? I am not sure what the query is exactly doing in order to re-write it and make it run-able.
You could use OPENQUERY to pass the query along to the remote server.
https://learn.microsoft.com/en-us/sql/t-sql/functions/openquery-transact-sql

SELECT without a TABLE (JDBC)

In most sql databases I have seen you can do something like:
SELECT ABS(-2.4)
and I get back 2.4. Notice there is no FROM clause.
When I try to do this in OpenEdge via Squirrel and the JDBC driver I get a syntax error. Is there a way to run SELECT statements like this (sans FROM clause) via JDBC?
Single row/column Dual equivalent; SYSPROGRESS.SYSCALCTABLE