Menu

col_length

Developers
Coleman
2006-12-14
2012-09-21
  • Coleman

    Coleman - 2006-12-14

    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.

     
    • Coleman

      Coleman - 2006-12-14

      Thanks for the quick response.... and solving my problem. :-)

       
    • Reztsov Alexey

      Reztsov Alexey - 2006-12-14

      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
      ...

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.