Subject | Re: [ib-support] Migrating from Microsoft SQL Server to Firebird |
---|---|
Author | Milan Babuskov |
Post date | 2003-04-17T11:18:05Z |
kokhoor wrote:
some 4 months ago. (It's not big, has about 80 tables).
use CONTAINING which is case insensitive and behaves like: LIKE '%name%'
So:
WHERE id CONTAINING 'name' (returns same as WHERE id LIKE '%name%')
and Linux. You can find third-party UDFs that will do the job for you on
both platforms. Since in 99.99% of cases I just want NULL to be
converted to zero, I use z() function from rfunc library:
SELECT id, name, z(amount) as amount from account;
someone else might help you.
BTW, you can tell us which operating system are you running.
--
Milan Babuskov
http://fbexport.sourceforge.net
> Hi all,Welcome. I also migrated one of my production databases from MSSQL to FB
>
> I am new to Firebird and am a convert from Microsoft
> SQL Server. Thanks to the fact that Firebird is platform-
> independent.
some 4 months ago. (It's not big, has about 80 tables).
>Me too. ;)
> I have faced a few problems when I am porting my
> database from SQL Server to Firebird.
>AFAIK, For equality you have to use UPPER. LIKE case is better, you can
> 1) In Microsoft SQL Server, there is an option to set
> string searches to be case-insensitive for the entire database.
> So, where clauses like those written below works:
>
> WHERE id = 'name' (returns rows with id = 'name', 'Name', 'NAME')
> WHERE id like '%name%' (returns rows with id
> = 'mYname', 'NameMe', 'NAME')
>
> Besides using WHERE upper(id) = upper('name'), is there any
> alternative options for setting a field, a table or a database
> to be case-insensitive?
use CONTAINING which is case insensitive and behaves like: LIKE '%name%'
So:
WHERE id CONTAINING 'name' (returns same as WHERE id LIKE '%name%')
>There are few, availability depends on your OS. I use FB on both Windows
> 2) Is there an isnull(evalValue, ifnull) functionality in
> Firebird? The isnull function returns the value stored in ifnull
> when the evalValue is null.
and Linux. You can find third-party UDFs that will do the job for you on
both platforms. Since in 99.99% of cases I just want NULL to be
converted to zero, I use z() function from rfunc library:
> For example,turns to:
>
> SELECT id, name, isnull(amount, 0) as amount from account;
SELECT id, name, z(amount) as amount from account;
> 3) There is a length limit to field names, constraint names andI haven't had trouble with this one, and don't know the answer, so
> table names. Any way to extend that limit?
someone else might help you.
> Regards,Good luck with your migration.
> Kok Hoor
> SolutionX Software Sdn. Bhd.
BTW, you can tell us which operating system are you running.
--
Milan Babuskov
http://fbexport.sourceforge.net