Search This Blog

Thursday, September 8, 2011

Select Statement using Like Keyword

The Following Sample code will filter the Time fields from the Tables.

static krishh_selectstatementWithLike(Args _args)
{
    sqldictionary sqldictionary, sqlDictionaryLocal;
    Name  sqlName;
    ;
     while select sqlDictionary
        order by name
        where sqlDictionary.fieldId == 0
    {
        sqlName = sqlDictionary.name;
        while select sqlDictionaryLocal
            where sqlDictionaryLocal.TableId   == sqlDictionary.TableId
        {
            if(sqlDictionaryLocal)
            {
                select sqlDictionaryLocal where sqlDictionaryLocal.fieldType == Types::Integer &&
                sqlDictionaryLocal.name LIKE '*time*';
                info(strfmt("Table Name : %1, Field Name : %2", sqlDictionary.name, sqlDictionaryLocal.name));
            }
        }
    }

}

No comments:

Post a Comment

Thanks for visiting my blog,
I will reply for your comment within 48 hours.

Thanks,
krishna.