I'm looking to find if there is a datatype convert equivalent in Object Script to SQL convert function. Have a VarBinary string coming in from source application (which is really performing a SQL dump). The source application uses the standard SQL convert function to convert from varchar to varbinary on their side.
I know &sql(Convert()) should work in Object Script, but am wondering if there is a better way of doing this.
Getting data in via flat file (Record Map), then using data transform to transpose this data to SDA3.
Hello everyone! I need to have a ResultSet of type % SQL.Statement show its contents when it is trafficked in a message property by Business Process. I tried to use the % XML.DataSet type that inherits properties of type % XML.Adaptor, but did not work. Is there any other way to traffic as an object, other than within a Stream?
Note: I can not traffic Streams and I will not be able to use Correlate in this case.
I have a Recordset object which contains data from a table "XYZ".
Currently i use this object to extract data using %Get(COL1,COL2...) in a loop and than pass it to a function which inserts the data into another dynamically created Table "ABC" for each record. This takes a lot of time when 100's of records.
Is there a way i can directly copy a RecordSet to a dynamic table without looping through..?
Something like copy Recordset (COL1,COL2..)--> "ABC"
When calling the below stored procedure using the management portal (Run Query) no data is being retrieve, but if it is directly executed management portal data will show.
"IN" does not work changing it to "=", "like" the stored procedure will work. Does any one know how to fix this ?
I am trying to get a list of all settings for all the config items of a given production using SQL . When I run the following sql as a dynamic query I am unable to access the setting names and values. Settings is a list of Ens.Config.Setting
New to machine learning? Watch this video on InterSystems Developers YouTube to understand the basic concepts of machine learning and how it provides value in applications around the world today:
https://www.youtube.com/embed/LC07-3S3xyo [This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]
Since I'm just starting to use this aspect of IRIS I can't tell if this is a bug or some kind of nuance. If I run a single column query like this, I get results:
However if I try to retrieve using a DISTINCT or GROUP BY, I get no results:
And again except with a GROUP BY, with no results:
I noticed that a query called directly in a method of a class of a business operation does not return the same result as if I apply the same query in the same Caché database from Squirrel !!!
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
I have csv date file with date values like this "4/10/2021" for April 10, 2021. I defined a table with this property: Property TranDate As %Library.Date.
I capture error
[SQLCODE: <-104>:<Field validation failed in INSERT, or value failed to convert in DisplayToLogical or OdbcToLogical>] [Location: <ServerLoop>] [%msg: <Field 'dc_data_finance.transact.TranDate' (value '4/10/2021') failed validation Field ...
I do not really want to change TranDate to %String. How can I import "4/10/2021" into %Date property?
I want to have a script that can run from the usual unix, linux, or aix command line. It has to be able to get into an irissession and use set statements to get data using sql. It seems like I'm in a catch-22. When I use the irissession SERVER command at the command line, I can't run a script. When I put the irissession SERVER command in a script, it won't run anything in the script after that.
My goal for this script is to get this information and put it into a file which I can then parse.
I am working on Converting Non HL7 message (Using record maps) into HL7 message.
1.Can anyone share few details how to save Non HL7 message into SQL table and the converted HL7 message into SQL table
2.In Message Viewer is there any SQL tables are linked to the session id or where the information regarding the message will be stored? Will the message trace details are stored in globals or in SQL table,If yes can anyone share the details in which tables or globals will it be stored?
SELECT '['||Material->Sifra||'] '||Material->Opis AS Material, SUM(MasaBlago) AS MasaBlago FROM Tehtanje.Dokument WHERE DatumDokumenta BETWEEN '01/01/2023' AND '04/01/2023' AND (Material->Sifra %INLIST $LISTFROMSTRING('5,7',',')) GROUP BY Material ORDER BY %EXACT Material
The query returns all rows where Material->Sifra is 5 or 7. That's OK.
If I want to get all rows where Material->Sifra is NOT 5 or 7 I use query:
So just this morning we started to get this error from all of our SQL-client based tools that connect to our Caché SQL via ODBC:
[%msg: <Error instantiating cached query class in Prepare(): <METHOD DOES NOT EXIST>Prepare+41^%SYS.SQLSRV *%New,%sqlcq>] (State:S1000, Native Code: 190)]
I have a question related to running an SQL query for range of data.
I am running a query like:
Select A,B from table_name where A>=12345 AND A<=12390
- Where A and B are my two of the properties under the mentioned table/class definition
- A is an integer property
Question: The result of the above query does not return me all the values between the mentioned range of integer though I do have all the values in that range. I see that some of the values are missing in result.
Hello! So, my knowledge on the Cache database is extremely limited, and I was hoping I could find some assistance here. I'm connecting to the DB via ODBC. The table(s) I'm interested in are named as such nameYYYYMMDD. So each day, a new table is created with logs. We'd like to grab these records each day, for the previous day's logs.