2

How do I read a class parameter using Caché SQL?

select * from table does not list any class parameters.

Derek
  • 952
  • 3
  • 13
  • 34
O.O
  • 11,077
  • 18
  • 94
  • 182
  • @MichaelGardner - I mean class parameter: http://docs.intersystems.com/cache20121/csp/docbook/DocBook.UI.Page.cls?KEY=GOBJ_classes#GOBJ_classes_parameters – O.O Apr 30 '13 at 19:50
  • 2
    I'm surprised and disappointed to see this mark closed - it seems we see that happen every now and again when people don't understand the question is for InterSystems Caché. This is probably a side effect of it being such a niche database product (and possibly the only reference to "Caché" being in the tags, making the question sound really generic). The question here seems like a perfectly acceptable question for the Caché database, but I don't have enough reputation to vote to reopen this. – Derek May 02 '13 at 13:43
  • Looks like my flagging this for moderation worked and got this reopened. I slightly edited the title and question to make it clearer that this isn't a generic SQL question. – Derek May 03 '13 at 18:30

1 Answers1

4

Parameters are specific to the class definition, not specific to the object or row. Therefore, you cannot find them by querying the class table. Rather, you need to query the Class Definition tables. These reside in the %Dictionary classes.

For this particular query, you can use

SELECT * FROM %Dictionary.ParameterDefinition WHERE parent='Sample.Person'

In the SAMPLES namespace, this should yield results for all Parameters that are a part of Sample.Person - in this case, only EXTENTQUERYSPEC.

Brandon Horst
  • 1,921
  • 16
  • 26