As we all know, Caché is a great database that accomplishes lots of tasks within itself. However, what do you do when you need to access an external database? One way is to use the Caché SQL Gateway via JDBC. In this article, my goal is to answer the following questions to help you familiarize yourself with the technology and debug some common problems.
Trying to identify which records in the %SYS.Audit table are fails.
Eg, as user "WORKER", I run an attempted a grant, the terminal returns:
SQL> GRANT SELECT ON newschema.patients TO COORDINATOR [S1000][Iris ODBC][State : S1000][Native Code 112] [libirisodbc35.so] [SQLCODE: <-112>:<Access violation>] [Location: <ServerLoop>] [%msg: <User WORKER does not have required privileges to grant the privilege(s)>] [ISQL]ERROR: Could not SQLExecute
On the Latest GlobalSummit 2022, InterSystems Introduced Cloud SQL. So, you may have lightweight InterSystems IRIS with access to SQL only. Well, what if you would still need some Interoperability features in the cloud as well? There are various solutions on the market nowadays, which offer a bunch of integration adapters out of the box and can be extended with support from the community. Some time ago, I've implemented an adapter for the Node-RED project, which can be deployed manually everywhere you want. Now I would like to introduce a new integration with my recent discovery, n8n.io
n8n.io is a workflow automation platform, that supports over 200 different integrations out of the box and from a community, and now including InterSystems IRIS.
SELECT Category, CrewNumber, MedicalCertificationDate, Seat, SeatbeltUsed, Sex, ShoulderHarnessUsed, ToxicologyTestPerformed, childsub INTO #tempfemale FROM Aviation.Crew WHERE Sex = 'F'
In this article you will have access to the curated base of articles from the InterSystems Developer Community of the most relevant topics to learning InterSystems IRIS. Find top published articles ranked by Machine Learning, Embedded Python, JSON, API and REST Applications, Manage and Configure InterSystems Environments, Docker and Cloud, VSCode, SQL, Analytics/BI, Globals, Security, DevOps, Interoperability, Native API. Learn and Enjoy!
I have a question regarding SQL insert/update from the mananger portal's SQL window.
I am trying to do an insert with a value that contains multiple spaces ($32) between two words. This is needed for a comparative reason. But the spaces are automatically trimmed away all the time. How should I write to keep these?
Example:
Insert into TableA (MyColumn) Values('xxxx yyyy')
then the spaces are trimmed away and it becomes: 'xxxx yyyy'
But I want to keep the spaces. How do I get around the problem?
When I use jdbc driver to query the column info ,the "REMARKS" field always show the same as the "COLUMN_NAME" field.
When I use the sql "select * from INFORMATION_SCHEMA.columns a where a.table_name='some table name ' " to query columns info,there has a "DESCRIPTION" field ,the value is some comment for the current field.
So is there anyway to return the description to the jdbc remarks field? And is there anyway to update the desciption or remarks field? Or is there some other way that I don't know to manage column comment info?
I encountered a strange issue I just can’t solve and I am running out of ideas. After reading the relevant passages of the documentation, asking the community is my last resort.
I running a query and get the results inside a result set. Now I have to iterate through the result set many times. From the doc I've seen only the Next() method. Is there a way to reset the cursor? Otherwise what is a good data structure to save multiple rows of a table?
My code in this case is something like this:
set sql = "SELECT * FROM MY_TABLE WHERE X= '"_Y_"'" set status = ..Adapter.ExecuteQuery(.rs, sql) // somehow iterate the rs more than one time
Hello, new user here ! My admin granted me all access to the domain I'm working on. Nonetheless, I'm unable to perform simple SQL queries such as creating a table or an index.
What I have tried :
Creating a table : within the namespace I've been granted access to, I'm trying to create a table with 2 methods :
I'm trying to add multiple rows at a time to a SQL table for a persistent object, but I can't seem to get the syntax correct. When I try the below it doesn't work.
Hi, we are trying to run a dynamically generated Oracle Insert SQL script using Do $SYSTEM.SQL.DDLImport("Oracle",""," sql.txt",[Error Log]) to insert multiple rows into a Linked Table within HealthConnect to an Oracle database.
We have tried using statements that are accepted within Oracle but not when using Intersystems DLL along the lines of :
An interesting pattern around unique indices came up recently (in internal discussion re: isc.rest) and I'd like to highlight it for the community.
As a motivating use case: suppose you have a class representing a tree, where each node also has a name, and we want nodes to be unique by name and parent node. We want each root node to have a unique name too. A natural implementation would be:
I'm getting wrapped around the axle with CAST and CONVERT and can't seem to find a way to do this (short of adding a stored procedure wrapping $zdt($zdth(posix,-2),3), which I'm refusing to do on principle, because there has to be some way to make this work).
I am calling a stored procedure over an ODBC connection and every time I call it there are several warnings written to the log event {Found no Parameter 1 (used as 1) for query}.I seem to be getting this on every query executed and that seems to happen a number of times the query parameters are per query and its filling up my disc.
1) Is there a way to suppress these warnings as the query seems to be executed and data written to the database?
I'm trying to load some data into IRIS using LOAD DATA in the IRIS terminal however I am getting blocked by this error. I have read the documentation on this page trying to set up a gateway connection but get the same Connection cannot be established error.
I have an scenario, please advise or suggest possible ways to solve it. So i have a persistent class to test results of a diagnostic laboratory. The properties are
I have a table with a Varchar(max) column that I have created via the HealthShare SQL portal, and I see that in it's underlying class that column corresponds to a %Stream.GlobalCharacter
When I try to do a text search on that column (referenced as cd.Code in the example below) I get an error
I'm struggling to insert into a table, and it is baffling me. The insert statement is now very simple (I was using a complex INSERT SELECT statement but I'm trying to narrow down the problem).