Subject | Re: [firebird-support] Re: Strange problem using Between ... And... |
---|---|
Author | Wei Yu |
Post date | 2006-02-07T16:13:27Z |
Hi,
Good Point!. However, the parameter of the stored procedure indicates that FromAccount and ToAccount are all of type INTEGER, and the ACCOUNT_NO field in my CONTACTS table is of INTEGER type too, Will be the case that the values pass to the parameter FromAccount and ToAccount are of string type, therefore casuing FB using character comparision, I dont think so.
William
Svein Erling Tysv�r <svein.erling.tysvaer@...> wrote: --- In firebird-support@yahoogroups.com, "william_yuwei" wrote:
was defined as CHAR, VARCHAR or something similar. Have you checked
the current definition of this table?
I don't know enough about the internals of Firebird, but maybe some
automatic type conversion in your makes the comparison against
CONTACTS.ACCOUNT_NO be a character comparison in your first SP,
whereas it is translated to an integer when you assign it to your
output variable in the second procedure.
HTH,
Set
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SPONSORED LINKS
Technical support Computer technical support Compaq computer technical support Compaq technical support Hewlett packard technical support Microsoft technical support
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "firebird-support" on the web.
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
William, Yu
---------------------------------
Yahoo! Mail - Helps protect you from nasty viruses.
[Non-text portions of this message have been removed]
Good Point!. However, the parameter of the stored procedure indicates that FromAccount and ToAccount are all of type INTEGER, and the ACCOUNT_NO field in my CONTACTS table is of INTEGER type too, Will be the case that the values pass to the parameter FromAccount and ToAccount are of string type, therefore casuing FB using character comparision, I dont think so.
William
Svein Erling Tysv�r <svein.erling.tysvaer@...> wrote: --- In firebird-support@yahoogroups.com, "william_yuwei" wrote:
> I've got a very strange problem, I have a sql statement in aThis is what I would expect to be the result if CONTACTS.ACCOUNT_NO
> stored procedure which works OK UNTIL TODAY. It just suddenly return
> strange result. I have a field called ACCOUNT_NO is of type INTEGER,
> in the where clause I have like, ACCOUNT_NO between :FromAccount and
> :ToAccount, if FromAcccount is 1 and ToAccount is 1000, it should
> return whatever the range in 1-1000. but all suddenly it returns 1,
> 10, 100, 1000, total 4 records always no matter how many records it
> should have.
was defined as CHAR, VARCHAR or something similar. Have you checked
the current definition of this table?
I don't know enough about the internals of Firebird, but maybe some
automatic type conversion in your makes the comparison against
CONTACTS.ACCOUNT_NO be a character comparison in your first SP,
whereas it is translated to an integer when you assign it to your
output variable in the second procedure.
HTH,
Set
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SPONSORED LINKS
Technical support Computer technical support Compaq computer technical support Compaq technical support Hewlett packard technical support Microsoft technical support
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "firebird-support" on the web.
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
William, Yu
---------------------------------
Yahoo! Mail - Helps protect you from nasty viruses.
[Non-text portions of this message have been removed]