Hi all,
I am trying to execute a query like the below code.
set statement = ##class(%ResultSet).%New("some_class:query_method"). // here query method is empty and with rowspec some columname

statement.Execute(param1)

I want to fetch data type of column value returned from above. eg - Name - VARCHAR, amount - INTEGER etc.
How can I get it. Or if not possible directly. Is there any other way to validate or get datatype of values returned. Line we have type() in python3

0 5
0 274

Hello all,

I'm trying to build a cube based on a linked table but seems that IRIS is not able to do it :O

Long story short, I have a linked table in IRIS that sources a Microsoft SQL table (using standard linked feature from the portal). It works fine, I can access it using SQL as many other times. On top of that, I've created in DeepSee (ok, Analytics) a cube that uses this class as source. It compiles correctly, no errors given. When I build it with 100 records, all goes well and using Analyzer I can see results.

0 0
0 99

Hi All,

On February 8, 2024, we asked for input from the IRIS community regarding exam topics for our InterSystems IRIS Developer Specialist exam. We will close the window for providing feedback on the exam topics on Friday, March 8, 2024. If you would like to have your say in what topics are covered on the exam, this is your last chance!

How can I access the survey? You can access it here

0 0
0 46

Presenter: Andreas Dieckow
Task: Apply SQL security to multiple servers in a distributed system
Approach: Provide code samples for using new API calls to apply SQL security statements to multiple instances of our products

Description: The requirement that started at all. See examples on how to use this new feature and integrate it into your application by discuss code examples.

Problem: SQL Security is local to the instance and most of time driven by customer application code. That it is only local to the instance and is not automatically going to other instances requires a solution.

Solution: With application code use new API calls to issue SQL security statements that is applied to multiple instances.

Content related to this session, including slides, video and additional learning content can be found here.

0 1
0 218

I get this on some queries in some namespaces. For instance, this query:

SELECT TOP 10 SessionId, datediff(s,min(TimeCreated),max(TimeCreated)) as ResponseTime
FROM ens.messageheader
GROUP BY SessionId
ORDER BY ResponseTime DESC

It works fine in HSBUS but in HSREG it throws the error.

Server closed communication device

Does anyone know what would cause this? Would it log something more useful somewhere?

0 7
0 876

Hi,

The following sql statement is working through the SMP but couldn't make it work through the code.

The table is a linked table to oracle db.

Tried to change the date property in the linked table class from %Date to %String and also tried using %SQL.Statement and %Library.ResultSet

this work through SMP:

INSERT INTO PACKAGE.SOME_TABLE_NAME

(EFFECTIVE_START_DATE,MORE,DATA,HERE)

VALUES (to_date ('2018-04-01','yyyy-mm-dd'),123,456,789)

In the code i'm using '?' in the statement for the parameters.

0 14
0 395
Question
· Oct 25, 2018
Healthshare Health Insight

Hello,
I need help in health insight. I am trying to generate reports on deep see but i am not able to pull in the patient ids as these are our requirements for the project. Can anyone help me in unlocking this feature.
Can anyone help me with link to correct documentation on how to access the edge gateways of multiple facilities to access the clinical data on sql explorer.

0 3
0 429

Hi

Can I use a the SQL 'Table-Valued Parameter' when i call a store procedure in sql outbound adapter using ExecuteProcedure?

to pass multiple rows all together as a block, I need to process all the records in one transaction using commit and rollback (if failure)

Thanks

Gadi

0 1
0 194

Hi guys!

As you know there are two (at least) ways to get the stored value of the property of InterSystems IRIS class if you know the ID of an instance (or a record).

1. Get it by as a property of an instance with "Object access":

ClassMethod GetPropertyForID(stId As %Integer) As %String

{

set obj=..%OpenId(stId)

return obj.StringData

}

2. Get it as a value of a column of the record with "SQL access":

0 18
0 908
Question
· Jan 6, 2020
ODBC Providers for SQL Server

Where can i get the latest odbc providers from SQL Server 2012/2016?

I see some posts on line to an ftp site out there but I am unsuccessful at getting access to it. I have a version loaded on my server but get errors when querying cache'.

"[Cache ODBC][State : 22005][Native Code 22005]"

Any help would be appreciated.

the one we have might be version 2014.01.05851 64 bit (would that make sense?)

0 4
0 1.6K

I'm using Cache SQL and want the ability to choose a specific index.

I've boiled the problem down to one table and simplified the query down to

SELECT *
FROM Registration.PatResp
WHERE SchedApptNum=8450022

SchedApptNum is indexed, but instead of using that column, "Show Plan" indicates that it's looping through the entire Registration.PatResp table on Id (the primary key for the table).

I've done a tune-table with no change.

0 6
0 868

I'm close with this but I'm not sure how to grab JUST the GT1.3 data. I know I can do a substring but finding the 3rd | is a tad tricky. I've not been this deep in SQL for 15 years.

SELECT SUBSTRING(hm.RawContent, (CHARINDEX('GT1',hm.RawContent)), 50) as NameDesc
FROM Ens.MessageHeader as em, EnsLib_HL7.Message as hm
where em.Status = 'Suspended'
and em.MessageBodyId = hm.id

I expect it should flow like this...

SELECT UNIQUE SUBSTRING(RawContent, (FIND 3RD PIPE),(FIND 4TH PIPE) as NameDesc ....

0 1
0 204

I want to INSERT a record in a database using JDBC in OBJECTSCRIPT. At the same time, I want to obtain the insert ID. Is there a way to achieve this using the SQL Outbound adapter?

My code is something like this now:


Property Adapter As EnsLib.SQL.OutboundAdapter;

set sql = " INSERT INTO Prenotazioni_CUP "_
" (ID, cf
" VALUES (SEQTAB.NextVal, ?) "
set status = ..Adapter.ExecuteUpdate(.rs, sql, pRequest.cfAssistito)

0 5
0 347

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 :

0 4
0 476

I am trying to migrate our SQL Connections from HealthShare Health Connect 2018.1.3 to IRIS HealthShare Health Connect 2022.2 using the Data Export/Import Wizard through the Management Portal. I am able to export the data fine, but I am running into issues trying to Import it into 2022.2 using the Data Import Wizard. When I run through the steps it is not importing everything from the txt file I created from 2018.1.3. I would rather not have to rekey all the connections if possible.

Here is the Background Task Error Log

0 2
0 254
Question
· Jan 30, 2023
SQLComputed Code issue

Hi All,

I have a below query for which I need help.

I have a persistent class User.Cars.cls. The properties of this class is mapped through Global mapping with global (^CAR(Date,CarSerialno,Seq)).

Property CarNumber as %String (TRUNCATE=1) [SqlFieldName= CAR_Number];

Mapping of 5th Piece of ^CAR global to CarNumber property.

For e.g.^CAR(Date,CarSerialno,Seq)=1^2^3^4^BMW 4567^6^7

0 1
0 157