#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2016
    Location
    UK
    Posts
    1
    Rep Power
    0

    Question Get table fields literal default_value


    Hi All

    I am selecting meta from a v2.5 DB (originally v1.4 as I recall). The default values I get out are BINARY
    (basically a function)

    Does anyone know how to get the literal defaults?

    I am using this SQL to get the meta:

    Code:
    SELECT A.RDB$FIELD_NAME AS OUT_NAME, 
                    A.RDB$DEFAULT_VALUE as OUT_DEFAULT, 
                    A.RDB$NULL_FLAG as out_null, 
                    B.RDB$FIELD_LENGTH AS OUT_Length, 
                    C.RDB$TYPE_NAME as OUT_Type 
    FROM RDB$RELATION_FIELDS A 
    JOIN RDB$FIELDS B ON A.RDB$FIELD_SOURCE = B.RDB$FIELD_NAME 
    JOIN RDB$TYPES C ON B.RDB$FIELD_TYPE = C.RDB$TYPE AND 
                      C.RDB$FIELD_NAME = 'RDB$FIELD_TYPE' 
    WHERE RTRIM(RDB$RELATION_NAME) = 'sometable' 
    ORDER BY 1 ASC;
    Any help would be great

    Thanks!

    F
  2. #2

IMN logo majestic logo threadwatch logo seochat tools logo