Question:
There is a string 120000 12 0 .125 , how you will find the position of the decimal place?
Answer:
INSTR('120000 12 0 .125',1,'.') output 13 Source: CoolInterview.com
INSTR('120000 12 0 .125',1,'.') output 13
the answer is INSTR('120000 12 0 .125','.') output 13
if you will use INSTR('120000 12 0 .125',1,'.') it will give u error as (invalid number) so please use it as below INSTR('120000 12 0 .125','.') output 13
Thanks Mujahid khan
Source: CoolInterview.com
Answered by: mujahid | Date:
| Contact mujahid
CHARINDEX('.','120000 12 0 .125') Output: 13 Source: CoolInterview.com
Answered by: Parag Chitale | Date: 8/5/2008
| Contact Parag Chitale
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|