Home » RDBMS Server » Performance Tuning » Data Type Mismatch
Data Type Mismatch [message #183890] Mon, 24 July 2006 04:54 Go to next message
bagulia_pilla
Messages: 25
Registered: July 2006
Junior Member
Please help me for this condition.
I need to know if there is any data type mismatch.
Plz send me all the details since I need to

[COD]
what will be performance Issue when data type mismatch
while joining two columns.

Example
1) Number(38) = Number(4)
2) Varchar2(38) = Number(4)




[/CODE]
Re: Data Type Mismatch [message #183898 is a reply to message #183890] Mon, 24 July 2006 05:13 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
There is no datatype mismatch in 1)

In 2), one of the columns (at the optimisers discretion) will be converted to the type of the other. I think it favours conversions to varchar2, but I can't remember where I read that.
This may well lead to lots of problems, which is why you should ALWAYS try to do the conversions explicitly - that way you get to control what happens.
Re: Data Type Mismatch [message #183905 is a reply to message #183898] Mon, 24 July 2006 05:38 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Besides, what prevents an end-user to enter "one hundred" into the varchar2 column as "1oo" (two small o's) or "1OO" (two capital O's), instead of "100" (two zeros). To them it will be all the same. Looks like one hundred, doesn't act like one hundred. Who can tell me why?
Re: Data Type Mismatch [message #183917 is a reply to message #183905] Mon, 24 July 2006 06:44 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Or they could put in something like '100,347.23', which IS a valid number , but only if you use the right format mask.
Previous Topic: urgent- help me
Next Topic: RBO to CBO Conversion
Goto Forum:
  


Current Time: Mon May 06 05:56:33 CDT 2024