HI I am using below code to retrieve the last inserted ID of the table. It works when we do not set any custom column as IDKey. If we define any column as
IDKey below code does not return any IDKey. I know when i am defining any column as IDKey its not auto generated , but whats the best way to get the ID column value
I have this question for a long time. When I make an insert by SQL from an external application in the fields of type %String, if they are empty, it writes the character $c(0) in the global.
Is there a way so that if an Insert is received in a field of type% String with null value instead of the $ c (0) it leaves it empty?:
I'm running into an issue performing UPDATES that I'm not getting on INSERTS. It's probably obvious, but I'm just not seeing it and could use a little help.
I'm going over an HL7 message and depending upon varying criteria, the relevent variables will get items added to them like the following:
Set patientId = pRequest.GetValueAt("PID:3")
Set sqlColumns = sqlColumns_",patient_id"
Set sqlValues = sqlValues_",?"
Set par($i(p)) = patientId
After compiling the variables, I check to see if accession number is found in the table.
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?
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...
I'm new to cache, come from an oracle and sql server background. In oracle and sql server I could write basically a stored procedure like script and pass it in as text to the command to execute.
Example:
Below would be the _sqltext
DECLARE @Id INT;
select id into @Id from something;
if @Id = 9
BEGIN
do something
END
The _sqltext would work in sql server, what would be the equivalent for cache for it work?
I have two tables: one a local table using cache and the other is via an SQL gateway connection to an MSSQL Server via a 64bit ODBC driver (ODBC Driver 17 for SQL Server).
When I try to join them on a date field I don't get any matches, and I know that there are matches, e.g. running both views separately returns resuls for 30/11/2022.
The following statement returns rows for the first table r, but nothing for the table l
https://www.youtube.com/embed/yUn5hdUVlXo [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]
We are doing a SQL server upgrade to SQL server v.15 from a legacy server which had v.10 . I have our Cache server as a linked server int order to pull data from our system. When building out the ROWSPEC, I have my fields typed as %String with various lengths with one field having a max length of 15000. The SQL server is trying to interpret this as a text data type instead of varchar(n). Text is a depracated data type since SQL server 2008. The error below is produced when trying to query from this view
https://www.youtube.com/embed/jjYnVsF9xeI [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]
For example, I have two timestamp values ('2024-04-01 10:00:00', '2024-04-01 11:30:30'). I would like to find the difference between these two timestamps, and I need the result in hours:minutes:seconds (hh:mm:ss) format.
Expected Output: 01:30:30
Note: I need an SQL query command. I should not use ClassMethod, Function, or Stored Procedure.
Could anyone please provide me with an SQL query for my question?
I have a table that is already created and contains data. I need to create a unique constraint that is a combination of two fields. Is there a way to do this in a SQL statement? Also, I would lke to know how to add it in the table class.
I've created a method in my File Service to do a cleanup for every file load. Currently, I've set it to delete data when LastUpdated date is greater than maxdate. However, I want to do a cleanup for every new file load. Any suggestions or advice on how to do this? Thanks!
Our software commonly returns a full result set to the client and we use the DataTables plugin to display table data. This has worked well, but at datasets grow larger, we are trying to move some of these requests server-side so the server handles the bulk of the work rather than the client. This has had me scratching my head in so many ways.
I'm hoping I can get a mix of general best practice advice but also maybe some IRIS specific ideas.
Hello. Currently, we are developing using Cache 2018 version. Our team is working on improving an existing legacy program so that it can also be used on the web.
Before asking my question, here is the development environment.
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.
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?
Does anyone know how to return the sys.process table with the corresponding configname item for each process? Also, is there a key for the Job Type field?
I have an operation which uses the SQL outbound adapter to query a data source set up using a system DSN on the server which uses the Intersystems ODBC35 driver (this is a cache db hosted elsewhere).
Whenever Ensemble runs the following query:
SELECT lnkdid, c_fastsearch_code, c_drugfull FROM JAC.drug_basic WHERE c_drugfull LIKE 'Para%'
No data is returned, however running the same query via SQL Server Management Studio, all expected rows are returned.