Announcement
· Jul 9, 2018
Caché SQL Queries

I have finished my 4th book about Caché and MUMPS. This will probably be my last.

I am deeply grateful and humbled for all the help I have received from this group and the WW Response Center.

You all have something very special going here.

13 1
0 1.2K

Hi, Community!

Please find a new session recording from Global Summit 2017:

Optimizing SQL Queries

https://www.youtube.com/embed/nEKYDd2meDM
[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]

2 0
0 391
Question
· Oct 2, 2018
%NOLOCK in insert query

I would like to know , if its safe to use %NOLOCK in insert query while doing some parallel processing in Ensemble. We will have pool size of more than 1 for a business process. The business process does an entry in internal meta data table , which will be used for some internal reporting. The same row might get updated by some other process later point of time. i could not produce any error or any issues . Looking forward to hear some opinion on this.

1 1
0 1.1K
Question
· Jul 17, 2018
Cache Dynamic SQL Pagination

Would like to know if there is an alternative or better way to paginate through a dataset using dynamic SQL than what I am using below. The problem is that as the potential pool of data gets larger, this code slows down to the point of not being useable. In analyzing each line of code below, it appears the slow down is related to the initial rset.%Next() iteration. Is there anything available which does not require a subquery/%VID such as a simple LIMIT/OFFSET?

My code is similar to :

s sql=##class(%SQL.Statement).%New()

1 25
3 2.7K

Hi Community!

New session recording from Global Summit 2017 is already on DC YouTube Channel:

SQL – Things You Should Know

https://www.youtube.com/embed/7fQ_ozYtAqk
[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]

1 2
0 474

Hi everyone,

I need submit a object have a json string as property of class, but I get an issue, object can't save to SQL table if I take json data to json property. I try making a test class with only json property and get the same issue, no data row in SQL table after run ClassMethod . Some one know what's problem, please help me. Here my test class:

1 2
0 728

We have a new requirement being push down by our Data Security to no longer use Local SQL Accounts to access our Databases. So they asked me to create a Service Account that is on the Domain for our connections to each database.

I tried just changing my JDBC connection to using this Service Account and Password but I am not having any luck trying to connect to the database.

" Connection failed.
Login failed for user 'osumc\CPD.Intr.Service'. ClientConnectionId:ade97239-c1c8-4ed1-8230-d274edb2e731 "

1 4
0 3.6K

How to convert SQL persistent classes to JSON output - I have tried 1 option but appears to be very lengthy process.

I have many other SQL storage's defined and have to expose them as well to JSON. Can anyone please suggest a better approach.

My column names usually match with my Json properties.

My User.TestClass is the class with GetJsonList() as my method to return /output JSON formatted data.

The Code tried and SQL storage structure are as follows -

1 3
0 960
Announcement
· Oct 20, 2018
Looking for work

Hi every body

I hope it's the right place & I'm not offending any body.

I'm a veteran Mumps/Cache/Ensemble programmer . I think my only draw back is my age, although my brain is still young & bubbly.

I'm looking a long time for work without success.

I gathered a lot of knowledge & experience during those long years , developed many projects & i'm ready to do any work only to feel useful.

I'll add my resume, I hope & wish that this post will bring some change as I'm desperate to get some work.

1 0
0 396

Hi all,

We have a big problem because we have the following message when I try to open the messages in a production.

ERROR <Ens>ErrException: <DATABASE>zfindStatement+29^%SQL.DynamicStatement.1 ^%sqlcq("MYNAMESPACE","Query",8,"Gns8AZO5dJclytqv13l9gUuLUyo=",""),c:\intersystems\healthshare\mgr\cache\ -- logged as '-' number - @''

SOURCE ELEMENT: %ZEN.Component.tablePane (resultsTable)

1 4
0 452
Question
· Feb 21, 2018
HL7 segment query using SQL

I'm trying to get a count of specific message type with a specific entry and thought I could build the query in Message Viewer but this does not provide counts (as far as I am aware). So when I take the SQL from 'Show Query' it omits the segment criteria as the code shows below.

I have attached the criteria that has been excluded. Is this possible?

Thank you

0 2
0 1.4K

I have generated a class using the linked procedure wizard however I can't get it to work if the datatype of one of the parameters is VARCHAR(MAX). It works fine if I change it to say VARCHAR(500) and rerun the stored procedure wizard.

I get the following error returned.:

ErrorMsg: SQLState: (07002) NativeError: [0] Message: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error

0 12
0 848

Hi Community!

Please welcome a new session recording from Global Summit 2017:

What's Lurking in Your Data Lake?

https://www.youtube.com/embed/FGr5CAyWcGY
[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]

0 0
0 307
Question
· Nov 15, 2018
SQL calculated property rollback

Greetings all,

I have a quick SQL question. I am working with a class, which has a calculated property, which in turned indexed.
The calculation for this property is created based on another property value via:
SqlComputeOnChange = attributes - so basically every time I add a property attribute to my class, my new property
is calculated based on some SqlComputeCode which calls some class method.

That initial setup works as designed.

0 1
0 258

SQL gateway. 'Locking' problem.

while debugging, is there in Caché a command to 'unlock' the instance of a class ?

close class, and kill class is not enough.

same problem in %Activate link

for each debug I have to exit (Halt) the terminal,

make debug in C#

coming back , and re-load again in Caché.

Regards,

Emanuel

0 1
0 304

When using the JSON_OBJECT() function in Caché SQL on a %String property that contains JSON syntax, it converts the %String into a JSON object instead of escaping it as a string literal. How can I prevent this? (without ridiculous hacks like "add a space to the beginning of the value" as we don't always know which properties will contain these values and I certainly don't want to have to check for nulls and add/remove a space every single place this value is used in the application)

I don't want these strings automatically marshalled into JSON objects.

For example:

0 12
0 1.2K

I have a class that has a property calledTags (like DescriptiveWords, but tags), where multiple tags are possible. I am trying to decide on list of Objects vs. array of Objects.

Based on this post: https://community.intersystems.com/post/querying-list-property-sql, sounds like using an array of Objects is the better way to go. Indeed, I already noticed that it's not possible to have duplicates when using an array of Objects.

0 4
0 798
Question
· Nov 22, 2018
Embedded SQL bug?

Hi

Is this a bug? We came across it on an older version of Cache but I've also just tried it in version "Cache for Windows (x86-64) 2017.2.2 (Build 865U)" and got the same result.

Create a Class like so:

0 2
0 518