Follow Danny's advice above (or below, no idea where this comment will land) and if it turns out to not be straightforward, feel free to contact Support (, 617-621-0700).  One of us would be happy to log in with you and help you troubleshoot this. 

For what it's worth, enabling Auditing (after you change the System events for Protect and LoginFailure to be enabled) should tell you what the problem is pretty clearly.

The correct way to do this is with TO_DATE:

select TO_DATE('19850720','YYYYMMDD')

That will convert the text in the first argument (a string) using the format in the second parameter into a date, which will be displayed using the current selectmode.  Try this in the Management Portal.

As Robert C. said, the reason for this is because aggregate functions do not follow the rules of Read Committed mode.  Moreover, the way to tell if you have values or not is to check SQLCODE, not the answer.  For instance, even if you did:

&SQL(SELECT AttrA into :valA FROM Test."Table")

You could still find your value (1) in valA.  Your next line should ALWAYS be checking SQLCODE.  Without that check, you cannot be sure that the value in your variable is good.

You can use ##class(Ens.DataType.UTC).timeUTCtoLocal()  like so:


ENSDEMO>s utc=$ZDATETIME($ZTIMESTAMP,3)                



2017-11-03 14:44:15

ENSDEMO>w ##class(Ens.DataType.UTC).timeUTCtoLocal(utc)

2017-11-03 10:44:15.000

Jason - do you want to look into this some more?  I've tried emailing you a couple times but haven't heard back.

This works for me.  I used this class definition:

Class Test.JDBCStream extends %Persistent

Property Content as %Stream.GlobalCharacter;


And the following query form SQuirreL SQL on Mac worked fine:

INSERT INTO Test.JDBCStream (Content) VALUES ('A long String')

So I'm not sure exactly what you're doing.  Do you have code?  Examples?  

As Len stated yesterday, you should open a WRC Issue.

Edit: Sorry this post looks bad, the text editor on this site is awful.

Moderator: fixed

Post Moderator Edit: Still looks bad, lost the syntax highlighting, and being able to edit people's posts kind of ruins the point of an open forum.

This is a good question - it causes a bit of confusion for those starting out with arrow syntax.  When you use -> you are doing what we call an "implicit join".  If you look at the docs here:

You'll see that an implicit join is a LEFT OUTER JOIN.  This is very different from an INNER JOIN as it will return rows from the first table whether or not the ON clause is satisfied.  Now, if your queries were:

1) SELECT Child.Name FROM Mother LEFT OUTER JOIN Child ON Mother.ID = Child.Mother WHERE Mother.Name LIKE 'A%'
2) SELECT Child.Name FROM Child WHERE Child.Mother->Name LIKE 'A%'

Then these queries would be exactly the same, and you should use the one that you find easier to read and work with.

2 additional notes:

1) LIKE kind of sucks when used in this way, because the optimizer isn't given the parameter.  Therefore it code generates assuming the parameter could be '%'.  This leads to poor performance.  If you are looking for the first letters in a string, you should use %STARTSWITH like so:

SELECT Child.Name FROM Mother INNER JOIN Child ON Mother.ID = Child.Mother WHERE Mother.Name %STARTSWITH('A%')

That will allow a ranged read of the Name index (which I assume you have) instead of a full scan.

2) If you set these up as a parent-child relationship in your class definition, you should change it to one-to-many or to use foreign keys.  The reason for this has to do with the storage.  Without going into too much detail, if you have a parent-child relationship they are stored on disk together, with each parent very close to its children.  This causes performance problems if you want to look at just the parent information alone, as you'll have to load in the child information, even if you don't need it.  

You have to go the other way:

SELECT * FROM Foo JOIN Bar on Foo.MyBars [ Bar.ID

Note [ is the ObjectScript "Contains" operator.

The typical recommendation is that if you care at all about the relational structures of your tables, you will NOT use lists.  You are far better off using Arrays, which project as child tables, or one-to-many relationships, if applicable.

Currently the only way to give permissions on "Future" tables (that is, tables you haven't created yet) is to grant permissions on the schema and then add tables to that schema.  

Note that when you assign SQL Privileges, you should do so to a Role. The InterSystems security model is such that you grant resources to roles, and roles to users.  SQL Permissions are resources that you should grant to Roles.

Do you understand what a Cross-Origin Resource Sharing (CORS) is?  You can allow CORS requests, but it is important that you understand what you're getting into.  That is, you need to think about it in the context of your application as it effects the accessibility of your data.  So before going too far with this, please think about what changes here might mean.  Some reading materials:

Now, you seem to have this working on one webserver and not another.  Do both webservers point to the same HealthShare instance?