Creating a table using enum datatype

Hi Friends,

?

Is it possible to create a table using enum datatype?

If it is possible please give one example.

?

I am trying to create table using… tableenum:([] enumx:`enum$()) at q prompt. But, I was getting error as 'type.?

Please let me know?if I am wrong.

?

?

Thanks,

Raghavender.

you have to create the enum variable first

q)enum:`symbol$()

q)tableenum:( enumx:`enum$()) 

q)meta tableenum

c    | t f a

-----| -----

enumx| s    

Regards,

  Attila

Ohh… Thank you very much… Attlia.

Now I am able to create a table using enum datatype.

But, how to insert values for that datatype.

As I was very new to kdb+, please let me know the usage of this datatype and how to insert values to this datatype.

?

?

Thanks and Regards,

Raghavender

https://code.kx.com/trac/wiki/QforMortals2/casting_and_enumerations#Enumerations

Regards,

  Attila