select flc.parameters.name, flc.parameters.value from flat(objects,parameters) as flc where (library_part_name='Built-in Cooktops 15') and (flc.parameters.variable_name = 'CooktopType' ) and (CAST ( flc.parameters.value AS CHAR ) ='Type 7' )but when I try to do a SELECT COUNT, the interpreter errors. Is there no way to get a COUNT using the inbuilt SQL interpreter?
Danny wrote:Well thank you so much for posting the info about CAST. You have spurred me on to re-investigate old territory.
I have tested CASTing the type in V15, V16 & V17 and they all work successfully. I often try to make ArchiCAD work in ways that aren't documented - and sometimes have a little success. No COUNT thought :cry:
Karl wrote:Thanks, Karl. I think I've seen this and forgotten it somewhat. Great reminder. The data type conversion matrix looks like something from the API documentation. Note that GDLVARIANT is shown as a type that cannot be converted. But this is exactly what I and Danny Sparks-Cousins used the CAST for: to convert GDLVARIANT to CHAR so that the VALUE of an additional parameter, (say, the value '=Xxyz 123'), can be queried. Without CAST, I get the error that 'Xxyz 123' is not the same type as GDLVARIANT.
I searched my computer for a reference to Graphisoft SQL and found the attached PDF which it looks like I converted from an HTML file some years ago... 2005 maybe? Don't see a nondisclosure, so assume this is pubic info.
No COUNT, but the CAST is described. Also an interesting image converter that I hadn't tried.
Documentation is available for GRAPHISOFT SQL. It is included in the GRAPHISOFT ODBC (Open Database Connectivity) documentation which can be downloaded from the Documentation section of the GRAPHISOFT Developer Center at the following web page: http://www.GRAPHISOFT.com/support/developer/.So you will probably be able to find the most up-to-date SQL Reference in the ODBC Docs if you download it.
Karl wrote:I don't recall very much. I'll check the document cited by Laszlo. My recollection is that the SQL doc used to be the one cited for AC14 ODBC, referring users back to the ODBC Doc for AC13 which contained the SQL info. I asked along the way -- of course! -- why ODBC wasn't brought forward with current doc names, contents, etc.
Too many years now - maybe Didrik remembers - but I cannot recall if ODBC exposes 100% of the data available within the AC SQL window.