Hi there,

Does anyone have an example of the method used to run an SQL query and generate the view in a Mumps routine. I have several SQL queries created from a vendor that need to be converted and the corresponding view referenced. I cannot seem to find any examples in IDX routines or in the IRIS/Cache documentation. Any help is appreciated.

-Alicia

0 5
0 393

Hi members,

I have these data :

and need to exploit the first character of cot field (Library CDU classification) like this :

I get this result... it's approximatively what I want... but I need it in just one line !

With mySQL I get it with just GROUP BY rcddate

0 3
0 291

I've been accessing Cache tables from a developer/reporting side, but am now involved in a project to create a data warehouse for our application. I'm trying to find a query I can use to return the sizes of all the tables in the database, so we can identify the largest tables and handle those individually. Can someone give me a query I can run against our Cache database to return the sizes of all the tables from largest to smallest?

Thanks for the help

0 8
0 640

When i use &sql(SELECT ......) in Cache I can watch the generated code
In the generated .int code and see what is happening.
Just with my normal rights

Now in IRIS I have just 4 line calling some class %sqlcq.***
With enough rights i find there is no such class but the generated .int routine
%sqlcq.IRISAPP.xEZgUjdXCCgQdZQPpRdOye1Ci2ue.1
That holds the code that i had in my .int on Cache

Can i switch this back somehow ?

0 7
0 468

Hi Dev Community,

I have a persistent Document class that has a FileName string property and another Question class that has an optional one-to-many relationship with Document.

I'm trying to add a SqlComputed property to the Question class (docFileName) where docFileName = Document.FileName if there is a related Document or an empty string if there isn't one.

I'd prefer the property to be SqlComputed so that if Question.Document changes, Question.docFileName will automatically update.

0 12
0 380

Hi,

Is there way to set up an automated batch job in the Management Portal to execute an SQL query. Also, how can the related view be exported. I have executed the SQL queries and see the view and created files manually. I could not find any related documentation on the batch processes, but I thought batch or automated jobs could be set up via the Management Portal. Any information is appreciated...

Thanks

0 5
0 220

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 guys,

My client has a requirement to add a column of random numbers to the query result.

I wrote a function as below:

Class Utils.SqlUtility Extends %RegisteredObject
{

ClassMethod GetSomeNumber(intInput As %Integer) As %Integer [ SqlName = GetNumber, SqlProc ]
{
Return $R(intInput)
}

}

But in the returned sql result, every row share the same value, as below,

SELECT Utils.GetNumber('456'),
ID, Citizenship, DOB, FirstName, Gender, IDNumber, LastName, PatientNumber, PhoneNumber
FROM CDR.Patient

0 6
0 867

I need to execute multiple DELETE statements in a single query like this

DELETE FROM TableName WHERE ID = 2;
DELETE FROM TableName WHERE ID = 3;
DELETE FROM TableName WHERE ID = 4;

However It does not work when there're more than 2 statements and gives me an error

Expected FROM found WHERE^DELETE FROM TableName WHERE

Using IN is not an option.

0 9
0 327

Hello, I need to use IRIS to connect to an MSSQL base.
It has to be done via ODBC, I can't use JDBC at this time by client option.

I am trying to use Microsoft Driver
libmsodbcsql-13.1.so.9.2

But I can't, my attempts result in:
Connection failed.
SQLState: () NativeError: [11001] Message:

I have done all DSN configuration, and my configuration is listed in SQL Gateway Connections. I know it's working, because when I run a test with isql I have the information that connects to the bank.

1 2
0 712

So I am working with an inherited SQL query that queries 8 different tables. 5 of which have over a million records.
I have 3 different servers.

Server 1, Server 2 and Server 3. They all have the same data/tables/structure across all servers.
Server 3 has an Iris database engine and the other 2 are Cache 2015.1.4.

I have a problem with views and performance across the servers being inconsistent.

Thankfully Server 1 is the current live server that performs "fast enough".
Server 2 is being synced from Server 1 and acts as a report server.

0 1
0 171
Question
· Sep 13, 2021
SQL - use specific index

Hello Community,

we want to use a specific index on our sql-class.

The index we want to use is called "iFilter".
Currently we use the following technique of ignoring all other indices because the automatically chosen index is always too slow.

0 3
1 243

Hello everyone

I am new to cache. In an interview i was asked how to optimize a sql query.

I just said I will create index on conditions which are present in where clause. But as per interviewer I should check How query plan is getting executed. This will help in optimizing Sql queries.

I want to know what will be the answer for how to optimize SQL query in cache.

Thanks in advance!!

0 2
0 186

After linking in Oracle Table with Field Column's Data Types of NUMBER, my updates into these table fields are resulting in data that is being rounded to 2 decimal places. I insert a record with 1234.1234 and 1234.12 is stored.

It appears Cache xDBC might be manipulating my values prior to sending to Oracle. Is there a setting or system parameter that is controlling this? If so, is there a way to relax this from occurring so the values I send are being stored in Oracle with the same values?

0 10
0 392

I'm wanting to write a query in SQL that will return a row with a count for each day for a given month or year for a specific operation or configname. The following is a start but I'm not finding what I want in the documentation to parse out the TimeLogged field of the table. Nay help is appreciated.

SELECT count(TimeLogged), ConfigName
FROM Ens_Util.Log
where TimeLogged like '2021-07%'
and ConfigName = 'operation_Name'
group by TimeLogged

0 2
0 147