The TIMESTAMP type corresponds to the %Library.TimeStamp data type (=%TimeStamp) in InterSystems products, and the format is YYYY-MM-DD HH:MM:SS.nnnnnnnnn.
If you want to change the precision after the decimal point, set it using the following method.
Customers who switch to Caché from relational databases report that their average performance is up to 20 time faster, running on the same hardware, with no changes to the application. What is it about Caché that lets applications run so fast?
I have vendors asking for verification that messages for locations are coming through to them. I can get generic ADT_A01 type of numbers in Activity. I'd really like to get some good SQL queries that can give me a count of MSH.4s (for example) for a day for X Operation. I'm not sure which table to look at for that information.
I'm using a JDBC driver to connect PGSQL -> Cache. I'm noticing when I run SELECT queries and COUNT(*) command against the same table, I get different result sets. I'm pretty new to Cache in general - so I'm trying to understand why these would be different.
Examples (TransID and InvNum should occur in every "row"):
SELECT COUNT(*) FROM ACCT.Services = 1,090,324 WHERE ACCT.Dept = 483
SELECT TransID FROM ACCT.Services = 1,085,776 WHERE ACCT.Dept = 483
SELECT InvNum FROM ACCT.Services = 586,023 WHERE ACCT.Dept = 483
I've two columns in my table and the type must be interval of integer values for example : age must be interval between [2 and 6] years and wigth between [10 and 30 ] Kg , how can i define them when creating my table?
i need help to access to a Global like ^name over ODBC (SQL) i will visit this global in a loop from a php site. It a access over SQL or ODBC possible?
https://www.youtube.com/embed/2-i2Z7aukSc [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]
In our application made in Caché object script, when we deploy some classes modified we have the option of calling "Purge queries" feature of Caché.
We only were doing this call when a %Persistent class definition (table) was modified, as we assume that no other changes affect the cached queries and we don't want to purge them by default, as the first run of a query becomes slow.
We had a case where no table definition was changed but a purge queries was the solution.
II try to explore the new SQL LOAD DATA feature in SQL comparing it to SQL INSERT
I'm stuck at this point: INSERT INTO <table> (columns...) VALUES (.....) allows having not just simple column references but also ALL Standard SQL FUNCTIONS (at least) example:
INSERT INTO Test (ShortName,DOB)VALUES (SUBSTRING(Name,1,4),TO_DATE(displayDate,'MM-DD_YYY'))
This works perfectly. BUT the same VALUE clause applied to LOAD DATA fails in various ways:
https://www.youtube.com/embed/gDI2yqvExEc [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]
I was struggling with a procedure that was meant to receive a string and use it as a filter, I've found that since I want the procedure to do some data transformation and return a dataset, I needed to use objectScript language.
I've created the procedure using the SQL GUI in the portal, and everything works fine when calling the procedure from the SQL GUI but not through a JDBC connection here is the call "call spPatientOS('2024-04-07T12:35:32Z')"
I have a linked procedure class and SQL gateway setup and I can't seem to get any response, status or error from using the stored procedure, I think it must be something big I'm missing to not even get a status.
Can someone see what my problem is please, any help would be very much appreciated.
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
A quick question regarding to SQL Query Plan: Why these two requests have different plans, in particularly, why second request needs temp file? To me, temp file is a bad thing which should be avoided, right?
select * from Test.Log where cdate = 1
select * from Test.Log where cdate > 1
Plan for 1:
Read index map Test.Log.cdateIndex, using the given %SQLUPPER(cdate), and looping on ID. For each row: Read master map Test.Log.IDKEY, using the given idkey value. Output the row.
I am trying to execute my SQL query using ExecDirect() method and it returns a ResultSet. No doubt it works fine after this I am trying to fetch each value using a loop code below. But before that, I am also checking for %SQLCODE = 100 which is for an empty resultset I think. However, It is not working as desired. In the case of an empty resultset also I am getting %SQLCODE = 0 until result.%Next() is called. Also, %ROWCOUNT is giving 0 in a case where my query is return 1 result row. I am so confused about this. while resultset.%Next() {
CREATE TRIGGER "SQLUser".SYM_ON_U_FOR_SYM_CHNNL_125123 AFTER
UPDATE
ON "SQLUser"."sym_channel" REFERENCING OLD ROW AS OLD NEW ROW AS NEW FOR EACH ROW
DECLARE @var_row_data VARCHAR(16336);
WHEN
(
1 = 1
and 1 = 1
)
-- I will use OLD/NEW alias here set @var_row_data = ''; LANGUAGE sql insert into mytable (id, data) values(1, @var_row_data);
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.
https://www.youtube.com/embed/aDo7PfmBnu8 [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]
Currently, the SQL privileges (SELECT, INSERT, UPDATE, DELETE) are managed at the tables level, which can be very tedious when you have to administer many roles in an organization, and need to keep them sync with a constantly evolving data models. By managing privileges at the schemas level, will allow to give SELECT and other DML privileges to *all* or *several schemas* to a role|user, fixing the need to manually synchronize the new tables|views to the roles.
Do you know if there is any way to disable the automatic tuning IRIS is doing every time a class is altered? It just takes too long in our case and is holding the system, so I'd like to tune the tables when I decide it (again).
I've seen in the documentation that for 2023 version there is an option present in the backend. But not for 2022, so I assume a flag is needed somewhere.
I got a resultset, and some columns might be a JSON_OBJECT. Is there a way (based on metadata) to determine that the column was formed from JSON_OBJECT function?
set rs = ##class(%SQL.Statement).%ExecDirect(,"SELECT 1 colA, JSON_OBJECT('id':1) col2")
do rs.%Display()