Will an upgrade from 2015.2 to 2017.1.2 or higher freeze the query plans from 2015.2? Is there some minimum source version where this will work?
SQL is a standard language for storing, manipulating and retrieving data in relational databases.
SQL is a standard language for storing, manipulating and retrieving data in relational databases.
Will an upgrade from 2015.2 to 2017.1.2 or higher freeze the query plans from 2015.2? Is there some minimum source version where this will work?
Has anyone use any other setting then -1 on the Stay Connected setting on a SQL.OutboundAdapter? I am having issues with a particular database and wonder if it would be beneficial since I only connect once a day to read the data from the Adapter to create an HL7 message.
Thanks
Scott Roth
Morning guys I have a SQL operation that I use to read data and results to a record map. But seems to have trouble saving the objects to a record map as I get this message
ERROR ErrException:
zInsertObject+2^%Library.RelationshipObject.1 -- logged as '-' number - @''
please help here is my code let me know if I missing anything thank you in advance
Method OnRequest(pRequest As DQToolsSet.PrimaryMessageREQ, Output pResponse As HSCIC.DBS.RequestRBAT) As %Status
{
#dim status as %Status=$$$OK
#dim resultSet as %SQL.StatementResult
set pobject=##class(%FileCharacterStream).Hi all.
I have some problem with getting data from external source (PostgreSQL) via JDBC and load it in DeepSee and I resolved some problems while writing this question :)
So..Below I proved my steps of working:
S Connection=##class(%Library.SQLGatewayConnection).%New()
S sc=Connection.Connect("jdbcurl","user","pass",0)
If $$$ISERR(sc) do $System.Status.DisplayError(sc) quit
S sc=Connection.AllocateStatement(.Statment)
S query="SELECT * FROM students"
S sc=Connection.Prepare(Statment,query)
S sc=ConnectionHi all,
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.
Also if I run the following via Ensemble:
SELECT lnkdid,
c_fastsearch_code,
c_drugfull
FROM JAC.
I came across How to import a tab separated text file into a SQL table programmatically?, which appears to indicate that I can pass the filename and all records will be imported. However, when I put use the Import method only a single record gets imported. However, all records are imported if I use the management console to import the file by selecting it and choosing the options.
Has anyone ran into this in the past?
Hi all,
I am new in Cache. I have to update a record with a long text field, for that, I am using ODBC but the issue is that it is returning an error when I execute the ODBC SQL statement because the field contains some commas, colon, double quotes, single quotes, and CR LF characters.
There is a way to escape this chars? I have seen I can save the field when I replace the single quotes with a double single quote (it's -> it''s) but I can not save the information when the field contains double quote chars. What about the other chars?
It is often necessary to sort the results of a query on a string field containing a combination of alphabetic and numeric characters. In cases like this the default string collation may not always return the data in the expected sequence.
An example of this may be where a select from Samples.Person should order the results by the street address, but firstly ordered by the street number part as numeric, and then by the street name.
The default query will return the results as follows:
SELECTName,Home_Street
FROMSample.Person
ORDERBYHome_Street
| Name | Home_Street |
|---|---|
| Eastman,Richard W. |
I am working my way through some SQL documentation.
The documentation follows and my question comes after.
A query supplied to %Prepare() can contain input host variables, as shown in the following example:
SET minage = 80 SET myquery = 3 SET myquery(1) = "SELECT %ID AS id, Name, DOB, Home_State" SET myquery(2) = "FROM Person WHERE Age > :minage" SET myquery(3) = "ORDER BY 2" SET qStatus = tStatement.%Prepare(.myquery)
This talks about input host variables
I thought that input host variables only work with Embedded SQL, not Dynamic SQL
Thank you
I don't quite understand the %NOMERGE mentioned in the documentation.
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_from#RSQL_from_nomerge
Is there any specific example provided to illustrate the idea?
Thanks.
Hi,
I am afraid I am stuck again. I have ensemble connected with a MsSQL database and I have a service that calls a store procedure. All is working, and I can get strings from the database in the service. The problem is that the data the store procedure returns is suppose to be an HL7 message so I need to convert the string into HL7 format. I have been using the
I noticed that the subscript of the index map is actually the collated field (%SQLUPPER).
Is String the only data type going through this transformation? Any other data type would also go through this transformation?
Thanks.
I'm trying to learn how To use SQL in CACHE, so I hope I don't bore you with "Dumb" questions....
I'm getting "ERROR #6022: Gateway failed" message following this line of code.
s sc=gc.Prepare(hstmt,pQuery)
This line of code comes from an example I found in the documentation. pQuery is the "Select" statement setting up the variables and tables I'm trying to pull information from.
What does that error indicate?
Thank you.
Hi, I am trying to execute a store procedure within an ensemble operation to connect to aMsSQL database and I am having problem to pass the input arguments... I have tried several things but only one seems to work and it is not the ideal solution.
This is the code that works...as you can see the parameter is added to the sql query...not the best solution but the only that works at the moment.
My question is actually about IDKEY since Primary Key is the common concept of SQL.
Why do we need IDKEY? In what kind of scenario, the IDKEY would be different from Primary Key?
Thanks.
This might be more of a math problem than a Caché question.
I have a SQL query that joins two tables. I want to assign a unique ID to each row of the product table.
What's the chance of collision if I append the GUIDs and truncate the result to 50 characters? Is there a good way to solve this without updating the clients?
Last week, we announced the InterSystems IRIS Data Platform, our new and comprehensive platform for all your data endeavours, whether transactional, analytics or both. We've included many of the features our customers know and loved from Caché and Ensemble, but in this article we'll shed a little more light on one of the new capabilities of the platform: SQL Sharding, a powerful new feature in our scalability story.
Hi,
My doubt is about the SQL Query in Caché:
I don't want to take all results from the table and orgainze them manually, for example: I have a table with 50 records, but I only want to select 10 records, being from tenth until the twentieth and this without knowing their IDs.
So, how can I do this, without losing performance, there is any way?
NOTE: In other SQL languages I can do, for example, SELECT * FROM extbl Limit 10 OFFSET 10
Thanks,
Andrei L. Nenevê
Just wondering which table holds detail for SQL Gateway Connections.
I'm trying to create an sal connections from one cache system to another. I've created the connection part and I think that is working. When trying to link a table through the link table wizard, I'm getting an error "<MAXSTRING>
Is this due to my global block size in the new system not being large enough? It is currently set at 8192.
Thank you
Mike
Hi -
I'm creating a custom report in Health Insight via SQL and one of the requirements says that I must include patients who are >= 13 years old (which is easy) but I also need to include patients who WILL be 13 years old as of December 31st of current year that the report is ran in.
I see that there is an Age column and an AgeInMonths column in HSAA.Patient. and of course a DOB column. I'm wondering if it is possible to do this purely using SQL (and SQL functions) or if I will have to incorporate a COS function to achieve this requirement.
Any suggestions?
Thanks,
Blake
select * from A left join B on A.x = B.x inner join C on B.y = C.y
does Cache SQL treat the join path: LEFT_JOIN(A,INNER_JOIN(B.C)) also a valid candidate path?
Thanks.
Hi, I'm a student, weak programming. I ask for your help, I write a program in C #, there are two tables, but I do not understand how to organize the connection between them many to many. Table in DataGridView1 from DataSet1 on Form1 key connection in DataGridView1 from DataSet1 to Form3
I do this on Form1
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex >= 0)
{
DataGridViewRow row = this.dataGridView1.Rows[e.RowIndex];
Form1.IDfor3form = row.Cells[1].Value.Hi,
I'm trying to use the IN operator in SQL.
does not work, can anyone tell me why that could be?
for example:
SELECT * FROM TafnitCore_Logistics_TransferPackage_DB.PackageData WHERE ID IN ('1||1||9852553062' , '1||1||9852553061' ) ORDER BY Building
And I get the following error:
SQL
|
Regards,
Nael
We have 1lakh records in table and while using sql select statement , it is taking more than 9mins to 12 mins to get the records. could you please how to optimize this performance issue if we have more records. how to optimize it.
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 a query that I am attempting to run, but inner query is being rolled up into the overall query - per the optimizer (and jobexam observation). While I know that if the inner query runs first, I will eliminate a number of records (making the result set smaller, and return quicker).
Just an example of what I am attempting to do:
select Account.Name, Account.State, Transaction.Amt, Transaction.Date, Transaction.Service
from Transaction
left join Account
on Account.Id = Transaction.Account
where Account.Id in (
Select Account.Name
from Account
where Account.
Any suggestions on the most efficient way to convert yyyymmdd string to mm/dd/yyyy?
Hi communauty
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?
thank's