Hi Community,
In this video, you will learn about exciting new ways to perform analytics using data in your HL7® FHIR® repository:
⏯ InterSystems IRIS FHIR SQL Builder: Sneak Peek @ Global Summit 2022
SQL is a standard language for storing, manipulating and retrieving data in relational databases.
Hi Community,
In this video, you will learn about exciting new ways to perform analytics using data in your HL7® FHIR® repository:
⏯ InterSystems IRIS FHIR SQL Builder: Sneak Peek @ Global Summit 2022
With IRIS 2021.1, we released a significant revision our SQL utilities API at %SYSTEM.SQL. Yes, that's a while ago now, but last week a customer asked a few questions about this and then @Tom Woodfin applied gentle mental pressure ;-) to make me describe the rationale of these changes in a little more detail on the Developer Community. So here we go!
Hello all; I am using a one-to-many relationship. I have a Claim (one), in a relationship with Lines (many), but the Claim is storing a list of Lines IDs, rather than the Lines storing the Claim Id. This seems upside down, and not what I expected.
Class Claim
{
Relationship ClaimLineRel as ClaimLine [Cardinality = many, Inverse = Claim];
}
Class ClaimLine
{
Relationship Claim as Claim [ Cardinality = one, Inverse = ClaimLineRel, OnDelete = cascade];
Index ClaimIndex on Claim;
}But the storage globals for Claim show data in the ClaimLine spot:
^ClaimD(1)=$lb("",$lb(2,3).
In Cache 2018, we were using a macro in a query that looked like this:
select $$GetExtraSQL^GetExtra('B',bddtl.odnumb,bddtl.odsnum,bddtl.oddsc1) as "Description", * from sqluser.bddtl
We could save that query as a view, and there was no problem with it.
In IRIS, if we put that query into SQL in the management portal, it still works, but if we save that query as a view, when we try to run a query on that view, we get a big error message:
ERROR #5540: SQLCODE: 400 Message: Process 604526 failed to compile Cached Query Class %sqlcq.R001.
Recently viewed a demo on the new Dynamic Objects in InterSystems (we are still running 2016.1); together with the upcoming IRIS data platform I started thinking about possibilities of building dynamic databases. That is, I can imagine some projects were it might be really nice to store dynamic objects and then run sql queries on them without ever defining the fields of the dynamic objects (i.e. not at storage, but only if you run your sql query). If there is any system where this might be possible it is InterSystems Cache.
I just wrote up a quick sample to help a colleague load data into IRIS from R using RJDBC, and figured it's worth sharing here for future reference.
Ultimately it was pretty simple, aside from IRIS not liking "." in column names; the workaround is to just rename the columns. Someone better at R than me could probably provide some generic approach. ![]()
# Need a valid value for JAVA_HOME prior to calling library(RJDBC) Sys.setenv(JAVA_HOME="C:\\Java\\jdk-8.0.322.
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.
.png)
How to delete this redundant task. Cannot press delete when logged in as _system
Hi:
Are these all depreciated in 2022.1? Our tasks don't run as can't find it and using a search of the docs they are last recorded against 2021.1?
Search InterSystems Documentation
There isn't any line in release notes to note that these no longer exist.
Hello,
I'm looking for a way to write a stored procedure or something to return a ResultSet with Embedded Python.
My goal is the following:
I have a Goal table with a Text field that is free text.
CREATE Table Goal (
Id int,
Text VARCHAR(5000)
);
I would like to create a procedure that returns all the entities (in the iKnow sense) in a new Entity column.
Python code, i would like to use :
import iknowpy
engine = iknowpy.iKnowEngine()
# Row to parse
text = 'This is a test of the Python interface to the iKnow engine. another sentence to test this program with.'
engine.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
but the record in the audit table gives
Description: "SQL GRANT Statement"
EventData: "GRANT SELECT ON newschema.
Hi,
My routine contains embedded SQL including this:
The error "SQLCODE=-52 : Cursor C10 already declared" comes up on compilation in Studio. Does anyone know a way around it please?
Bob
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.
How can we insert into a table using a stored procedure?
Table structure :
CREATE TABLE SampleHospital (
Hospital VARCHAR(50),
Location VARCHAR(50),
UserName VARCHAR(50),
UserFullName VARCHAR(70),
LastLogin TIMESTAMP,
LoginCount int)
Procedure Name:
call Custom_MENS_Other.samplesp('2021-11-02','2021-11-04','H001')
Hello guys,
Does anyone know what is a process status IPQW ?
We get it in jobs that do some SQL..
Thanks in advance.
Yaron Munz
Can someone help me on how the alter a table in Management table, I have tried the SQL and MYSQL way but it does not alter the table.
Thank you.
Hi,
I am trying to input an entire xml into a sql server table. I am doing this via an operation in Ensemble.
I keep getting the following error
[SQL Server]XML parsing: line 0, character 0, unrecognized input signature
I have setup the table with a column parameter XML.
Here is the request object that is being sent to the store procedure
{ call dbo.PopulateDataTable(?,?,?,?,?,?,?
In MS SQL Server i can do this:
SELECT
Category, CrewNumber, MedicalCertificationDate, Seat, SeatbeltUsed, Sex, ShoulderHarnessUsed, ToxicologyTestPerformed, childsub
INTO #tempfemale
FROM Aviation.Crew
WHERE Sex = 'F'
The code would create a new temporary table with the fields defined from Aviation.Crew. I cannot find how to do this in Cache SQL in the documentation. Can someone show me the correct syntax or other solution?
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!
Machine Learning is a mandatory technology to build advanced data analysis and automate manual activities with excellent efficiency.
Hi!
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?
Regards,
Michael
Hi ,
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?
Hi,
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.
The task itself is not complicated at all. I am using an EnsLib.SQL.OutboundAdapter to connect to a MS SQL Server (12.0.6433.1) and execute a simple query. Said query is using a temporary table from which I just can’t select any data afterwards. All I get is this error message: <Ens>ErrNoSQLColumns.
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.
Creating a table : within the namespace I've been granted access to, I'm trying to create a table with 2 methods :
CREATE TABLE test.hello_world (col1 INTEGER, col2 VARCHAR)
This raises the error :[SQLCODE: <-400>:
CREATE TABLE test.hello_world AS SELECT test.Kindly help me on the below points
1)Concatenate the Date column and Time column.
2)Get the current date only without time.
3)Find the current age using DOB column.
Hi
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.
INSERT INTO Sample_Table.Accounts (Account, AccountName, Bank)
VALUES
('123456', 'AccountNameOne', 'BANK1'),
('654321', 'AccountNameTwo', 'BANK2')Thanks
Peter
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.
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:
Class DC.Demo.Node Extends %Persistent
{
Property Parent As DC.Demo.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).
Any ideas?
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?