Not need develop new function.
Use follows:
if (not exists(select * from rdb$relation_fields where rdb$relation_name='TABLENAME' and rdb$field_name='FIELDNAME')) then
...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi All,
What is nice in MSSQL they have a function called "Col_Length" see below sample-
if col_length('TableName','FieldName') is null
begin
alter table 'TableName' add
fieldname varchar (10) (This can be any type of field)
end
What is the possibility of you guys creating this function in rFunc.
Thanks for the quick response.... and solving my problem. :-)
Not need develop new function.
Use follows:
if (not exists(select * from rdb$relation_fields where rdb$relation_name='TABLENAME' and rdb$field_name='FIELDNAME')) then
...