Or can I change namespaces within one connection object?
SQL is a standard language for storing, manipulating and retrieving data in relational databases.
SQL is a standard language for storing, manipulating and retrieving data in relational databases.
Or can I change namespaces within one connection object?
This article describes a significant enhancement of how InterSystems IRIS deals with table statistics, a crucial element for IRIS SQL processing, in the 2025.2 release. We'll start with a brief refresher on what table statistics are, how they are used, and why we needed this enhancement. Then, we'll dive into the details of the new infrastructure for collecting and saving table statistics, after which we'll zoom in onto what the change means in practice for your applications. We'll end with a few additional notes on patterns enabled by the new model, and look forward to the follow-on phases of this initial delivery.
The August Article Bounty on the Global Masters article caught my attention, and one of the proposed topics sounded quite interesting in regard to its future use in my teaching. So, here's what I'd like to tell my students about tables in IRIS and how they correlate with the object model.
First of all, InterSystems IRIS boasts a unified data model. This means that when you work with data, you are not locked into a single paradigm. The same data can be accessed and manipulated as a traditional SQL table, as a native object, or even as a multidimensional array (a global). It means that when you create an SQL table, IRIS automatically creates a corresponding object class. When you define an object class, IRIS automatically makes it available as an SQL table. The data itself is stored only once in IRIS's efficient multidimensional storage engine. The SQL engine and the object engine are simply different "lenses" to view and work with the same data.
First, let's look at the correlation between the relational model and the object model:
| Relational | Object |
| Table | Class |
| Column | Property |
| Row | Object |
| Primary key | Object Identifier |
It's not always a 1:1 correlation, as you may have several tables represent one class, for example. But it's a general rule of thumb.
Over the years, I’ve noticed that certain SQL questions come up repeatedly on the InterSystems Developer Community, especially about using the LIKE predicate in different contexts. Common variations include:
and many more derivatives. So, I decided to write an article that focuses on how LIKE works in InterSystems IRIS SQL, especially when used with variables in Embedded SQL, Dynamic SQL, and Class Queries, while touching on pattern escaping and special character searches.

First of all, I'd like to mention that InterSystems IRIS SQL offers most of the capabilities available in other relational DBMS that implement a later version of the SQL standard. But at the same time, it's important to mention that apart from relational access, in IRIS you can also use other models to get the same data, for example, object or document models.
On this note, let's look at the LIKE predicate and how this tool is used in SQL for pattern matching.
This article is a continuation of the IRIS JSON project and features additional methods and insights.
Let's continue with the instance methods
This instance method is used to determine the JSON data type of the %DynamicObject or %DynamicArray.
It returns one of the following strings:
|
|
USER>Set array = [1,"test",true,12.I have a table with 5M rows, the table contains lab observation codes and display names, both columns have type varchar(2000) and both are indexed.
The query looks like:
select code_1_text, count(code_1_text)
from demo.observation_lab
group by code_1_text
order by 2 desc
The table contains ~1000 distinct display names.
It takes 4 minutes for the query to complete on a VM with some pretty old Xeon, 4 cores, 32G RAM, NVME SSD and Linux on board.
Isn't it too slow?
Let's start with a simple motivating question: over the past 14 days, what are my most common errors in the Application Error Log?
Answering this through the management portal or terminal is an annoying manual process - we should just be able to use SQL. Fortunately, there are a few class queries to help with this in the SYS.ApplicationError class in the %SYS namespace. You can answer the question for a single date with something like:
select "Error message",count(*)
from SYS.Hi, I'm wondering what are the diferences between a method or classmethod with the language set at tsql and a querry writen in sql.
If anyone know if there is some difference and what they are, I would be glad to learn. 😊
Hello to all the Cache Experts out there and Happy Friday!
The company I work for uses Cache 2017.1.3 and we have been seeing intermittent errors in the Cache Error Trap when an SQL query runs. The error message looks like the error is occurring within the cached query routine that Cache auto-generates. Unfortunately, when I pulled up the routine in the SMP System Explorer, I only found an obj version, so was unable to look at any code.
Here is the error: Note: the .
Hello Again,
InterSystems Certification is still looking for people to beta test the InterSystems IRIS SQL Professional Certification exam. This is a great way to earn the certification for free!We have extended the deadline of the beta test to October 30, 2025.
Please note, only candidates with the pre-existing InterSystems IRIS SQL Specialist certification are eligible to take the beta. For details, see the original announcement.
Thank you!
As foreign tables are behind a paywall (booo); we have a external cache system using the intersystems ODBC driver or usually a .jar CacheDB.jar.
The requirement is :
"Create a copy of the external table once a day to perform comparisons to detect changes"
We could go full code and this is what we will do but trying the following should ideally work
CREATE TABLE Sample.YoungPeopletwo AS
SELECT *
FROM Pennine_TIE_Clinicom_Link.
InterSystems IRIS 2024 recently introduced the vector types. This addition empowers developers to work with vector search, enabling efficient similarity searches, clustering, and a range of other applications. In this article, we will delve into the intricacies of vector types, explore their applications, and provide practical examples to guide your implementation.
At its essence, a vector type is a structured collection of numerical values arranged in a predefined order. These values serve to represent different attributes, features, or characteristics of an object.
Hello my friends,
I have a problem with logi report,
in my store procedure, I create code like this?
.png)
as you see there's a <br/> in the display of the report
I have no idea about this, maybe someone can help me fix this problem ?
Thank You
Best Regards,
Steven Henry
Hello my friends,
I have a problem with Objectscript, why the value of address become like this ?
.png)
everything works fine except the Address,
this is my code, do I need something to make this into real address ? should I put something in my code ?
set paper=obj.PAADMPAPMIDR.PAPMIPAPERDR
if '$isobject(paper) continue
set Address=paper.PAPERStName
thank you for your help
Best Regards,
Steven Henry
Hello my friends,
I have a bit problem with date format, I need to display like this DD-MM-YYYY
I've put the objectscript like this : set DOB=$zd(paper.PAPERDob,15)
and the result is
.png)
Why It cannot show the full year, I mean why 99 or 95 why not 1999 or 1995 ?
Thank You
Best Regards,
Steven Henry
Do not let the title of this article confuse you; we are not planning to take the InterSystems staff out to a fine Italian restaurant. Instead, this article will cover the principles of working with date and time data types in IRIS. When we use these data types, we should be aware of three different conversion issues:
Maybe this is well known but wanted to help share.
Consider that you have the following persistent class defintions
An Invoice Class with a property reference to Provider
Class Sample.Invoice Extends (%Persistent, %Populate)
{
Parameter DSTIME = "AUTO";
Property InvoiceNumber As %Integer(MINVAL = 100000) [ Required ];
Property ServiceDate As %Date(MINVAL = "+$h-730") [ Required ];
Index InvoiceNumber On InvoiceNumber;
Property Provider As Sample.Hi Community,
Enjoy the new video on InterSystems Developers YouTube from our Tech Video Challenge:
This can be achieved by using the CSV() procedure of the %SQL.Util.Procedures class.
Below is an example of usage code. (Assuming that the file test.csv is in c:\temp.)
Hi everyone!
We’re currently determining the passing score for this exam and expect to publish it in late March or early April. Pass / fail notification emails for beta testers will also be sent out around that time!
For candidates interested in taking the SQL Professional exam at Ready 2026, please see the preparation materials and exam topics below.
Hello, good morning, thank you so much for reading this question. ☺️🙂👍
We are developing a code to get information about our Production's items: services, processes and operations.
We know we can get various configurations of a given item: Category, Port, Enabled...
But we wonder how we could get the date time of the last mesage (most recent) received in an item.
To give a code snippet a small section of the code we have developed (and tested), it looks like:
[...]
For i=1:1:tProduction.Items.Count() {
#dim item as Ens.Config.Item
set item = tProduction.How do I write DDL script for collection properties?
For example I want to create the following class:
Class SQLUser.Person {
Property Name As %String;
Property FavoriteColors As list Of %String;
}My DDL script looks like this:
CREATE TABLE Person (Name varchar(50), FavoriteColors ???)
This is a template for a Flask application that can be deployed in IRIS as an native Web Application.
git clone
cd iris-flask-template
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
docker-compose up
The base URL is http://localhost:53795/flask/.
/iris - Returns a JSON object with the top 10 classes present in the IRISAPP namespace./interop - A ping endpoint to test the interoperability framework of IRIS.We are glad to announce that DBeaver has supported InterSystems IRIS out-of-the-box since version 7.2.4. You don't need to configure it manually anymore, just find the IRIS icon in the Connections list.
.png)
If you're migrating from Oracle to InterSystems IRIS—like many of my customers—you may run into Oracle-specific SQL patterns that need translation.
Take this example:
SELECT (TO_DATE('2023-05-12','YYYY-MM-DD') - LEVEL + 1) AS gap_date
FROM dual
CONNECT BY LEVEL <= (TO_DATE('2023-05-12','YYYY-MM-DD') - TO_DATE('2023-05-02','YYYY-MM-DD') + 1);
In Oracle:
LEVEL is a pseudo-column used in hierarchical queries (CONNECT BY). It starts at 1 and increments by 1.
CONNECT BY LEVEL <= (...)Hi,
Can anyone please tell me how to append a string using a update query.
For eg : "Hello" is the string . I need to append the string world and it needs to be "Hello world".
Thanks
Jude
How would you go about creating an SQL Stored Procedure that would result in the same output as "IN LIKE"?
For example...
CustomersTable
| RecordId | CustomerName |
| 123 | Mark Stevens |
| 456 | Betty Johnson |
| 789 | John Stevens |
| 321 | Brian Smith |
| 654 | John Markson |
| 987 | Tom Obrian |
select *
from CustomersTable
where inLike('%Mark%', '%John%')Would return:
| 123 | Mark Stevens |
| 456 | Betty Johnson |
| 789 | John Stevens |
| 654 | John Markson |
Hello,
I have a class with a "Unique" index (pxfactidIndex) on a %Numeric property (pxfactid) (partially-edit code snippet below):
Property pxfactid As %Library.Numeric(MAXVAL = 9223372036854775807, MINVAL = -9223372036854775808, SCALE = 0) [ SqlColumnNumber = 7 ];
Index pxfactidIndex On pxfactid [ Unique ];
Storage Default
{
<Data name="FactDefaultData">
<Value name="1">
<Value>pysubjectid</Value>
</Value>
...
<Value name="6">
<Value>pxfactid</Value>
</Value>
...
</Data>
<DataLocation>^CRMBI.FactD</DataLocation>
<DefaultData>FactDefaultData</DefaultData>
<ExtentLocation>Is there a way in a EnsLib.SQL.InboundAdpapter that you can tell when you have reached the end of the Results of the Query?
Does anyone have a query that I could run to show a Vendor the time difference between when a message was sent out a BO, and when we received the HL7 ACK back that is associated with the message sent?
I am trying to prove to this vendor of the delay we are seeing getting the ACK back because of a Timeout
I know how to pull Ens.MessageHeader, and EnsLib.HL7.Message but not sure how to match up the Message with the HL7 Acknowledgement received.