Suppose I have full access to Caché database instance A and want to export consistent part of the data and import it into another Caché instance B. Classes are equal.
What are the most general and convenient options for me?
Can anyone provide some sample in ObjectScripts to import a tab separate txt file into a SQL table? I checked the document, there are two available classes, %SQL.Import.Mgr and %SQL.Until.Procedures, which one is better choice?
I have this code here;I am trying to read a csv file but when I run this code I get <LIST>%open+3^%stream.Object.1 would anyone have a look and tell me where I am going wrong .Record mapper is fine but I need a custom csv Importer
I have been using the query below and it was working fine but now it's giving a SQL error. There were no changes made that could cause this to stop working. There is no Field 'APPLICATIONID' in the table.
QueueSQL=select distinct (convert(char(5),SkillsetID)+'='+Skillset) from iagentbySkillsetStat where ApplicationID > 10000
QueueMappingSQL=SELECT DISTINCT (convert(char(5),SkillsetID)+'='+Skillset), SkillsetID FROM iagentbySkillsetStat iagentbySkillsetStat WHERE (iagentbySkillsetStat.ApplicationID>10000)
I am trying to come up with a way to decode the Base64 we receive in an HL7 message into a PDF file and save it in a directory on our AIX machine. I thought I had the following working at one time but I am having issues. Has anyone done this before?
You have a global ^CODE("TNO","BIO",291,"AKI") that may or may not exist. On the data side of the global ref it can have a boolean value of 0 (false) or 1 (true) and this global is wrapped up in a Caché class accessible from myobject.AKI property. At the object level, how do you check whether the property is defined ie. is there a $DATA equivalent for Cache Object properties? Also, how would you kill /null the property as opposed to making the value 0 (false) or an empty string?
Set httprequest=##class(%Net.HttpRequest).%New()
Set httprequest.Server="www.intersystems.com"
Do httprequest.Get("/")
Do httprequest.HttpResponse.OutputToDevice()
Do httprequest.Get("/cache/")
Do httprequest.HttpResponse.OutputToDevice()
Is there a better way to iterate through all properties of an object than the following? Perhaps without needing to open a definition of the class but directly against the object?
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?
Say I have two horologs or timestamps, how can I compare them? I know that just time1 > time2 doesn't work because it will compare them as strings which is not correct.
I am using a %GlobalStream to create as % stream.Object and writing that to a file but for some reason when I run that on the terminal I get <PARAMETER>zWrite^%Library.GlobalCharacterStream.1 and no file is created
I have tried the following here is my code and still get the same result any help appreciated
Hi All, Can you please tell me how to get the Size of the Global Subcript.
In Cache 2016 - they are using ##Class(%GlobalEdit).GetGlobalSizeBySubscript()
For Older version how to get the GlobalSize of the Subscript.
Because the method is not exist in Older Versions and all.
I want to do something like the above sample from a Google Storage JSON API. I have a call to Write obj.%ToJSON() followed by return ..ReportHttpStatusCode(..#HTTP404NOTFOUND) however the HTTP Status code is always 200. If I remove the Write obj.%ToJSON() statement it returns a 404 status with no body. How do I return both?
There is an interesting discussion in the neighboring topic which raises a question for me: is there any reason to have %Status as a return value for COS method?
I have a property, Emails, that needs to contain a list of comma-delimited values, or "". Is there a benefit to making this property a list of %String, a Collection[list] (or however you do it), an array, or anything other than a simple %String type?
I am trying to age based on a given date and current date here is my code:
Property DOB As %Date
Method GetAge() As %Integer
{
if (..DOB="")
{
set today=0
}
else
{
set today=$ZDate($HOROLOG,2)-$ZDate(..DOB)
}
write "Today's==="_$ZDate($HOROLOG),!
write today
return today
}
Is there a way to pull a user name and password from the Credentials list that is kept in Ensemble? Right now I have a LDAP user that I have hard coded into my ZAUTHENTICATE, which I would like to get away from. I am not to familiar with settings Global, or calling them at least.