Vitaliy Serdtsev · Jan 23, 2023 go to post

I'm looking at the output validation code, not Output, where there are no spaces at all on the right. It is a pity that there is confusion because of this!

 

Class codeGolf.test.Pyramid

Vitaliy Serdtsev · Jan 23, 2023 go to post
 

size = 50

ClassMethod Build(As %Integer)
{
a="#" i=f:-1:1 ?i-1,a,?f*2-1,! a=a_"##"
}

PS: if you look at the class codeGolf.test.Pyramid, you can see that the format of the output data for f=3 should be as follows:

"  #  "
" ### "
"#####"

So be careful.

Vitaliy Serdtsev · Dec 21, 2022 go to post

Your example does not take into account which element is selected.

For example, if you select the last element, then the list wins instead of the delimited string.

L=1e4,N=1e5,a="1",b=$lb(1)
i=2:1:a=a_"_"_i,b=b_$lb(i)

t=$zh
f i=1:1:c=$p(a,"_",L)
w $zh-t," s.",!  

t=$zh
f i=1:1:c=$li(b,L)
w $zh-t," s.",!
Vitaliy Serdtsev · Dec 21, 2022 go to post

I'll put in my five cents too.

Firstly, Apache for Windows is installed very easily: you just need to unpack the archive and, if necessary (this is done once), register the service. Secondly, it is not difficult to find the Apache distribution for Windows, for example here: Apache Haus Downloads Thirdly, I always remove PWS and use my own Apache, so I welcome removing PWS from the IRIS distribution

Vitaliy Serdtsev · Dec 1, 2022 go to post

It is not entirely clear that you are using Caché or IRIS 2021.1:

#Caché

I have two tables: one a local table using cache and the other is via an SQL gateway..

Product version: IRIS 2021.1

The presence/absence of restrictions on the execution of heterogeneous queries depends on this:

Vitaliy Serdtsev · Nov 11, 2022 go to post
 

size = 79

ClassMethod Order(As %StringAs %String
{
 r=i=1:1:5e5{s=$p(a," ",i),w=$tr(s,1e20/17),$p(r," ",$tr(s,w))=wr
}
Vitaliy Serdtsev · Oct 24, 2022 go to post

Have you looked at the type of fields in the metadata? For me, the INTEGER type (4) is returned for ID, and the BIGINT type (-5) is returned for %ID.

Try

<FONT COLOR="#0000ff">SELECT </FONT><FONT COLOR="#008000">id</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#008000">x</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#008000">y</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#008000">z </FONT><FONT COLOR="#000080">FROM </FONT><FONT COLOR="#008000">some_table </FONT><FONT COLOR="#000080">order by </FONT><FONT COLOR="#008000">%id</FONT>

and

<FONT COLOR="#0000ff">d </FONT><FONT COLOR="#800000">rs</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">%GetMetadata</FONT><FONT COLOR="#000000">().</FONT><FONT COLOR="#0000ff">%Display</FONT><FONT COLOR="#000000">()</FONT>

What are the default values for AdaptiveMode, AllowRowIDUpdate, IdKeyCPF, PKEY_IS_IDKEY ?

Try disabling AdaptiveMode.

Vitaliy Serdtsev · Oct 24, 2022 go to post

There is a faster way without opening the object:

<FONT COLOR="#000080">Class dc.test Extends %Persistent
</FONT><FONT COLOR="#000000">{

</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">Test() {      </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">classname</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"dc.test"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#800000">storagename</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"Default"   </FONT><FONT COLOR="#0000ff">w $$$defMemberKeyGet</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">classname</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#0000ff">$$$cCLASSstorage</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">storagename</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#0000ff">$$$cSDEFdatalocation</FONT><FONT COLOR="#000000">) }

</FONT><FONT COLOR="#000080">Storage </FONT><FONT COLOR="#000000">Default { <Data name="</FONT><FONT COLOR="#000080">testDefaultData</FONT><FONT COLOR="#000000">"> <Value name="</FONT><FONT COLOR="#000080">1</FONT><FONT COLOR="#000000">"> <Value>%%CLASSNAME</Value> </Value> </Data> <DataLocation>^abc.1</DataLocation> <DefaultData>testDefaultData</DefaultData> <IdLocation>^dc.testD</IdLocation> <IndexLocation>^dc.testI</IndexLocation> <StreamLocation>^dc.testS</StreamLocation> <Type>%Library.CacheStorage</Type> }

}</FONT>

Result:

^abc.1

Vitaliy Serdtsev · Oct 20, 2022 go to post

Here are two ways:

<FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">s</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"12162,CHAPTER I,Certain infectious and parasitic diseases (A00-B99),003 (A20-A28),Certain zoonotic bacterial diseases,A28,""Other zoonotic bacterial diseases, not elsewhere classified"",A28,""Other zoonotic bacterial diseases, not elsewhere classified"",N,N,N,N,N,,,,,,,,,,G"
</FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">%DeepSee.TermList</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%ParseCSVRecord</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">s</FONT><FONT COLOR="#000000">,.</FONT><FONT COLOR="#800000">arr1</FONT><FONT COLOR="#000000">)
</FONT><FONT COLOR="#0000ff">zw </FONT><FONT COLOR="#800000">arr1

</FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#000000">!

</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">list</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#0000ff">$$</FONT><FONT COLOR="#ff0000">CSVtoList</FONT><FONT COLOR="#000000">^%occLibrary(</FONT><FONT COLOR="#800000">s</FONT><FONT COLOR="#000000">)

</FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">%ListOfDataTypes</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">BuildValueArray</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">list</FONT><FONT COLOR="#000000">,.</FONT><FONT COLOR="#800000">arr2</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#0000ff">zw </FONT><FONT COLOR="#800000">arr2</FONT>


Take a look at the class methods %SQL.Util.Procedures

Vitaliy Serdtsev · Oct 19, 2022 go to post

If there was a built-in function for expanding the list into a table, then the solution would be even shorter.

 

An example of such a function:

Class dc.golf.Kata Abstract ]
{

Query split(
  As %VarString,
  delim As %VarStringAs %Query(ROWSPEC "word:%String") [ SqlProc ]
{
}

ClassMethod splitExecute(
  ByRef qHandle As %Binary,
  As %VarString,
  delim As %VarStringAs %Status
{
  ##class(%ListOfDataTypes).BuildValueArray($lfs(s,delim),.qHandle)
  qHandle=0
  q $$$OK
}

ClassMethod splitFetch(
  ByRef qHandle As %Binary,
  ByRef Row As %List,
  ByRef AtEnd As %Integer 0As %Status PlaceAfter = splitExecute ]
{
  d=$o(qHandle(qHandle),1,v)
  d="" AtEnd=1 else Row=$lb(v),qHandle=}
  q $$$OK
}
}

Now you can do a variety of things with the string, for example:

select min(length(word)) "min",length(wordlen,word from dc_golf.Kata_split('bitcoin take over the world maybe who knows perhaps',' ')

Result:

min len word
3 7 bitcoin
3 4 take
3 4 over
3 3 the
3 5 world
3 5 maybe
3 3 who
3 5 knows
3 7 perhaps
Vitaliy Serdtsev · Oct 7, 2022 go to post

There are no such methods, because the size of the stream (file) can exceed the maximum length of the string, which at the moment is 3641144, so the type of string (%String, %VarString, %xsd.base64Binary, etc.) will not always be able to hold all the data.

But also it is not difficult to read the stream into a line:
ClassMethod StreamToStr(ByRef stream As %Stream.ObjectAs %String
{
  s=""
  stream.Rewind()
  while 'stream.AtEnd {
    s=s_stream.Read($$$MaxLocalLength)
  }
  s
}

PS: above I have given methods, some of which are available in older versions of Caché.

Vitaliy Serdtsev · Aug 19, 2022 go to post
Vitaliy Serdtsev · Aug 4, 2022 go to post
well, looks so, but there are no methods, which will return available connections.
USER>d $system.License.ConnectionListFunc().%Display() or d $system.License.ProcessListFunc().%Display()
Vitaliy Serdtsev · Aug 4, 2022 go to post

Try to play around with the SetConnectionLimit() & SetUserLimit() methods.

PS: I do not know what about DBeaver, but DbVisualizer has the ability to configure one physical connection.

Vitaliy Serdtsev · Aug 4, 2022 go to post
..
sql=0
sql($i(sql))="select *"
sql($i(sql))=",%external(DOB)||' '||%external(DOBTime) DOBString"
sql($i(sql))=",TO_CHAR(DOB||','||DOBTime,'MM/DD/YYYY HH24:MI:SS') DOBString2"
sql($i(sql))="from dc.test"
st.%ExecDirect(.st,.sql).%Display()
..
Result:
USER>##class(dc.test).Test()
ID
(INTEGER)
DOB
(DATE)
DOBTime
(TIME)
DOBString
(VARCHAR)
DOBString2
(VARCHAR)
101.01.202023:59:5901.01.2020 23:59:5901/01/2020 23:59:59
231.12.202210:10:1031.12.2022 10:10:1012/31/2022 10:10:10
Vitaliy Serdtsev · Aug 4, 2022 go to post

I like @Yaron Munz version better

<FONT COLOR="#000080">Class dc.test </FONT><FONT COLOR="#000000">[ </FONT><FONT COLOR="#000080">Abstract </FONT><FONT COLOR="#000000">]
{

</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">Test() {   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">v</FONT><FONT COLOR="#000000">=0,     </FONT><FONT COLOR="#800000">v</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$i</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">v</FONT><FONT COLOR="#000000">))=</FONT><FONT COLOR="#0000ff">$lb</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"2021-11-27"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"2022-08-04"</FONT><FONT COLOR="#000000">),     </FONT><FONT COLOR="#800000">v</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$i</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">v</FONT><FONT COLOR="#000000">))=</FONT><FONT COLOR="#0000ff">$lb</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"2020-02-28"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"2023-02-27"</FONT><FONT COLOR="#000000">),     </FONT><FONT COLOR="#800000">v</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$i</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">v</FONT><FONT COLOR="#000000">))=</FONT><FONT COLOR="#0000ff">$lb</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"2020-02-28"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"2023-03-01"</FONT><FONT COLOR="#000000">),     </FONT><FONT COLOR="#800000">v</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$i</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">v</FONT><FONT COLOR="#000000">))=</FONT><FONT COLOR="#0000ff">$lb</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"2017-03-01"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"2020-02-28"</FONT><FONT COLOR="#000000">)        </FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">=1:1:</FONT><FONT COLOR="#0000ff">$o</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">v</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">""</FONT><FONT COLOR="#000000">),-1) </FONT><FONT COLOR="#800080">{     </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">d1 </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#0000ff">$li</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">v</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">),1),       </FONT><FONT COLOR="#800000">d2 </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#0000ff">$li</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">v</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">),2),       </FONT><FONT COLOR="#800000">age1 </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#0000ff">$e</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">d2</FONT><FONT COLOR="#000000">,1,4)-</FONT><FONT COLOR="#0000ff">$e</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">d1</FONT><FONT COLOR="#000000">,1,4)-(</FONT><FONT COLOR="#0000ff">$e</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">d1</FONT><FONT COLOR="#000000">,6,10)]</FONT><FONT COLOR="#0000ff">$e</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">d2</FONT><FONT COLOR="#000000">,6,10)),       </FONT><FONT COLOR="#800000">age2 </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#0000ff">$number</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$zabs</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$zdh</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">d2</FONT><FONT COLOR="#000000">,3)-</FONT><FONT COLOR="#0000ff">$zdh</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">d1</FONT><FONT COLOR="#000000">,3))/365.25,0),       </FONT><FONT COLOR="#800000">age3 </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#0000ff">$zdh</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">d2</FONT><FONT COLOR="#000000">,3)-</FONT><FONT COLOR="#0000ff">$zdh</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">d1</FONT><FONT COLOR="#000000">,3)\365.25            </FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#800000">d1</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">" "</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">d2</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">" (age1 = "</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">age1</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">", age2 = "</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">age2</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">", age3 = "</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">age3</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">")"</FONT><FONT COLOR="#000000">,!   </FONT><FONT COLOR="#800080">} </FONT><FONT COLOR="#000000">}

}</FONT>

Result:
USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">dc.test</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">Test</FONT><FONT COLOR="#000000">()</FONT>
2021-11-27 2022-08-04 (age1 = 0, age2 = 1, age3 = 0)
2020-02-28 2023-02-27 (age1 = 2, age2 = 3, age3 = 2)
2020-02-28 2023-03-01 (age1 = 3, age2 = 3, age3 = 3)
2017-03-01 2020-02-28 (age1 = 2, age2 = 3, age3 = 2)
Vitaliy Serdtsev · Aug 4, 2022 go to post

A simple example of combining:

<FONT COLOR="#000080">Class dc.test Extends %Persistent
</FONT><FONT COLOR="#000000">{

</FONT><FONT COLOR="#000080">Property </FONT><FONT COLOR="#000000">DOB </FONT><FONT COLOR="#000080">As %Date</FONT><FONT COLOR="#000000">;

</FONT><FONT COLOR="#000080">Property </FONT><FONT COLOR="#000000">DOBTime </FONT><FONT COLOR="#000080">As %Time</FONT><FONT COLOR="#000000">;

</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">Test() {   </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000000">..</FONT><FONT COLOR="#0000ff">%KillExtent</FONT><FONT COLOR="#000000">()      </FONT><FONT COLOR="#800080">&sql(</FONT><FONT COLOR="#0000ff">insert </FONT><FONT COLOR="#000080">into </FONT><FONT COLOR="#008000">dc</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#008000">test</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">DOB</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">DOBTime</FONT><FONT COLOR="#000000">)     </FONT><FONT COLOR="#0000ff">select </FONT><FONT COLOR="#000000">{</FONT><FONT COLOR="#000080">d </FONT><FONT COLOR="#008080">'2020-01-01'</FONT><FONT COLOR="#000000">},{</FONT><FONT COLOR="#000080">t </FONT><FONT COLOR="#008080">'23:59:59'</FONT><FONT COLOR="#000000">}     </FONT><FONT COLOR="#000080">union all     </FONT><FONT COLOR="#0000ff">select </FONT><FONT COLOR="#000000">{</FONT><FONT COLOR="#000080">d </FONT><FONT COLOR="#008080">'2022-12-31'</FONT><FONT COLOR="#000000">},{</FONT><FONT COLOR="#000080">t </FONT><FONT COLOR="#008080">'10:10:10'</FONT><FONT COLOR="#000000">}</FONT><FONT COLOR="#800080">)      </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">st</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">%SQL.Statement</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%New</FONT><FONT COLOR="#000000">()   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">st</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">%SelectMode</FONT><FONT COLOR="#000000">=2      </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">sql</FONT><FONT COLOR="#000000">=5   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">sql</FONT><FONT COLOR="#000000">(1)=</FONT><FONT COLOR="#008000">"select *"   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">sql</FONT><FONT COLOR="#000000">(2)=</FONT><FONT COLOR="#008000">",%odbcout(DOB)||' '||%odbcout(DOBTime) DOBString"   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">sql</FONT><FONT COLOR="#000000">(3)=</FONT><FONT COLOR="#008000">",CAST(%odbcout(DOB)||' '||%odbcout(DOBTime) as DATETIME) DOBDateTime"   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">sql</FONT><FONT COLOR="#000000">(4)=</FONT><FONT COLOR="#008000">",UNIX_TIMESTAMP(DOB||','||DOBTime) DOBUnixTimeStamp"   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">sql</FONT><FONT COLOR="#000000">(5)=</FONT><FONT COLOR="#008000">"from dc.test"   </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#800000">st</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">%ExecDirect</FONT><FONT COLOR="#000000">(.</FONT><FONT COLOR="#800000">st</FONT><FONT COLOR="#000000">,.</FONT><FONT COLOR="#800000">sql</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%Display</FONT><FONT COLOR="#000000">() }

}</FONT>

Result:
USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">dc.test</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">Test</FONT><FONT COLOR="#000000">()</FONT>
ID
(INTEGER)
DOB
(DATE)
DOBTime
(TIME)
DOBString
(VARCHAR)
DOBDateTime
(TIMESTAMP)
DOBUnixTimeStamp
(NUMERIC)
101.01.202023:59:592020-01-01 23:59:592020-01-01 23:59:591577923199.00
231.12.202210:10:102022-12-31 10:10:102022-12-31 10:10:101672481410.00
2 Rows(s) Affected
Vitaliy Serdtsev · Aug 4, 2022 go to post

Instead of two separate fields, it would be easier to use the %TimeStamp (or %PosixTime) type, where the date and time are paired at once. For this type of data, you can make your own indexes for different parts and/or combinations of them: a separate date, a separate time, a separate year, a separate year and month, etc. You can also use these separate parts in the query (in SELECT and WHERE).

select datediff('yy',DOB,current_dateAge from yourtable
Vitaliy Serdtsev · Aug 3, 2022 go to post

The very first message contains a link from where you can download the ODBC-2022.1.0.209.0 driver for different operating systems.

Vitaliy Serdtsev · Aug 3, 2022 go to post

What does the JDBC driver have to do with the question about the ODBC driver?

Unlike JDBC, the ODBC driver still yet needs to be registered in the OS (at least for Windows), which is what the installer does.

Vitaliy Serdtsev · Jul 19, 2022 go to post

Made some minor changes to your code and now everything works as expected.

ClassMethod ActivateSQL(customerIdAs %Status
{
  ...
  Quit $$$OK
}ClassMethod ActivateOO(customerIdAs %Status
{
  ...
  Quit $$$OK
}If mode=0 {
  Do $system.OBJ.DisplayError(objCust.ActivateOO(id))
else {
  Do $system.OBJ.DisplayError(objCust.ActivateSQL(id))
  Set objCust.Active = objCust.ActiveGetStored(id)
}

Or

If mode=0 {
 Do $system.OBJ.DisplayError(objCust.ActivateOO(id))
else {
 Do $system.OBJ.DisplayError(objCust.ActivateSQL(id))
 Do objCust.%Reload()
}