Hi World

I've a problem when in extract a float value from my database

the problem is that i get an interger instead of float.

my record is 2,56 but when i do a select , the request extract only 2

can you have a solution for it.

thank you

0 4
0 232
· Oct 14, 2017
Multiple joins in a SQL query


I have a query like below but its syntax is not accepted by Cache.

I would like to perform a left join on two tables first and then make a inner for this result with another table.

Given the constraint that we only allow one SELECT in the query, it is possible to achieve this semantics ?

Thank for your help.

Select *
FROM ( sample . employee e
LEFT JOIN sample . company c
on c . id = e . id ) g
JOIN sample . vendor v
on v . %id = g . attr

0 3
0 897

Hi, folks!

Is there any way to use $CASE or $SELECT functionality in SQL SELECT query?

E.g. something like this:

SELECT product, $CASE(status,"New":field1,"Payed":field2) as data from sales

To see either in data column either field1 or field2 values in regard of status value.

0 3
0 750

Hi, folks!

When you deploy DeepSee solutions you often do not want grant a User %All Role to work with a particular Dashboard.

Consider a Dashboard 'Dash' with a few widgets where listings are being used.

If you manage a Role to get access to the Dash you need to grant access to %DB_DBNAME resource to have a database access, grant access to a Dashboard resource (if any) and ... grant SELECT accesses to all the tables involved in SQL queries being used in all the listings of widgets.

1 3
0 371
· Sep 22, 2017
browse sql record

Hi , World

this is i field in my global:


for information: it's respective key is "peyload"

my question is :

I want to extract the timestamps value , and the profile_id value , how can i do?


0 4
0 297


I'm developing an integration between Caché servers by ODBC conection, and I have the following problem.

In this call:

call COSClass_Methode('222169^^98^155^64530^06:30^021542987897458855441112877855^1^0^281992^GC')

the ODBC driver is truncating the string to 50 characters.

If I run this same command with $system.SQL.Shell(), this doesn't occur.
I did a test creating several parameters for COSClass_Methode, and they all have a 50 character limitation.

0 4
1 1,525
· Aug 29, 2017
ad hoc sql service

Hi everyone, I have a SQL service that is working fine, except I don't want it to run on a schedule or continuously. I'd like to only run when requested. Run once and then stop until another request. Is there anyway to set up a service like that?

0 4
0 360
· Aug 24, 2017
Error on SQL update service

I have a simple SQL service that does a simple select from an SQL database. After the select, I do an update to set the ProcessedFlag to "Y" for yes, so my next pass doesn't select records already processed. The service works fine, except when it's done I get the error below, anybody know what is causing this error?

0 3
0 289

I am currently working on a issue with WRC on one of my Inbound SQL Adapters not returning all the records it should be. If I looked at the count of the records in Ensemble and compare it to that of a Microsoft SQL View, Ensemble seems to be off by a few records here and there. I am using a full dynamic select statement in my settings of the adapter.

SELECT Text, PhysicianLastName, PhysicianFirstName, PhysicianAddress1, PhysicianAddress2, PhysicianCity,

0 5
0 665
· Aug 8, 2017 1m read
Outperforming PostgreSQL and MySQL

In a previous exercise, I was able to show the power of Caché.
A medium-designed set of interdependent tables with some GB of data.
URLs cross reference over some million pages resulting in ~3 billion records

Competition was between

  • Caché
  • PostgreSQL
  • MySQL

Criteria were Speed + Storage consumption
I composed a customized loader fed over a "raw" TCP connection
Mapping the "objects" into the final table by directly writing to Global Storage.,

17 3
0 696
· Jul 22, 2017
select sql error


I execute sql like this: select * from DHC_PatBillDetails where PBD_PBO_ParRef>='2046121'

error message:

but the sql: select * from DHC_PatBillDetails where PBD_PBO_ParRef='2046121' can be executed successfully


0 5
0 278

I have a query string that I am creating programmatically, based on some user inputs. The user might search on 5 fields, or 8 fields, or no fields.

In my sql statment, some of these fields require parameters in the %Execute statement.

For example:

if user picks lastname, sql = "select * from person where lastname = ?"

if user also picks age, sql = "select * from person where lastname=? and age > ?"

I then have these lines of code to create my result set:

set statement = %SQL.Statement


0 28
0 21,294


Is it possible to use the value of a column that is populated by its own subquery, in the WHERE clause of the outer-query ?

The following fails (it does not parse syntactically):


I guess I could wrap it up as in inner query of it's own - this way (which works) :

Select * from 
(SELECT A, B, (SELECT S1 FROM Table2) "C" FROM Table1)
where C>10

but I was wondering if there was some syntax in the original snippet that I could do instead.

Thanks - Steve

0 3
0 572

Hello! So, my knowledge on the Cache database is extremely limited, and I was hoping I could find some assistance here. I'm connecting to the DB via ODBC. The table(s) I'm interested in are named as such nameYYYYMMDD. So each day, a new table is created with logs. We'd like to grab these records each day, for the previous day's logs.

0 2
0 604

Hi everyone

Is there any way to change a class definition (especifically a query definition during the compilation time)?
The idea is:
I have an abstract class with a parameter where I will define the ROWSPEC of a query and some methods to populate e temporary table
The implementation class will override the parameter, specifying the ROWSPEC of this implementation, and the methods will populate the rows in the same format as the ROWSPEC.

0 4
0 548
· Jul 7, 2017 19m read
Indexing of non-atomic attributes

Quotes (1NF/2NF/3NF)ru:

Every row-and-column intersection contains exactly one value from the applicable domain (and nothing else).
The same value can be atomic or non-atomic depending on the purpose of this value. For example, “4286” can be
  • atomic, if its denotes “a credit card’s PIN code” (if it’s broken down or reshuffled, it is of no use any longer)
  • non-atomic, if it’s just a “sequence of numbers” (the value still makes sense if broken down into several parts or reshuffled)

This article explores the standard methods of increasing the performance of SQL queries involving the following types of fields: string, date, simple list (in the $LB format), "list of <...>" and "array of <...>".

7 0
0 751

"SELECT %SYSTEM.SQL_TableExists('table name') "could work as expected under SQL shell,

but for "CALL %SYSTEM.SQL_TableExists('table name')" does not work (not any error reported, it just show nothing).

Is there any reason why CALL could not be applied to a stored procedure?


0 7
0 393