Click here to Skip to main content
15,897,518 members
Home / Discussions / Database
   

Database

 
AnswerRe: mysql, query performance question Pin
Robin_Roy27-Jul-09 18:06
Robin_Roy27-Jul-09 18:06 
QuestionSQL Stored Procedure push in the right direction :) Pin
cdietschrun27-Jul-09 10:46
cdietschrun27-Jul-09 10:46 
AnswerRe: SQL Stored Procedure push in the right direction :) Pin
Mike Ellison27-Jul-09 14:35
Mike Ellison27-Jul-09 14:35 
QuestionSSIS Package - Urgent need Help Pin
vasini27-Jul-09 7:39
vasini27-Jul-09 7:39 
AnswerRe: SSIS Package - Urgent need Help Pin
Abhijit Jana27-Jul-09 8:31
professionalAbhijit Jana27-Jul-09 8:31 
AnswerPlease Read Forum Guidelines Pin
leckey27-Jul-09 10:42
leckey27-Jul-09 10:42 
AnswerRe: SSIS Package - Urgent need Help Pin
Robin_Roy27-Jul-09 17:04
Robin_Roy27-Jul-09 17:04 
QuestionLoosing decimal values while selecting in Oracle Pin
sandhya1426-Jul-09 20:11
sandhya1426-Jul-09 20:11 
Hi all,

here is my SP

create FUNCTION fn_Ceiling
(
Source IN DECIMAL
)
RETURN DECIMAL
as
DecDiff DECIMAL(16,3);
Ceiling DECIMAL(16,3);
Source1 DECIMAL;

BEGIN

SELECT NVL(Source, 0) INTO Source1 FROM DUAL;
SELECT Source1 - FLOOR(Source1) INTO DecDiff FROM DUAL;
SELECT FLOOR(Source) +
case
WHEN DecDiff between 0.000 and 0.250 THEN 0.000
WHEN DecDiff between 0.250 and 0.750 THEN 0.500
WHEN DecDiff between 0.750 and 1.000 THEN 1.000
else DecDiff
end INTO Ceiling FROM DUAL;
return Ceiling;
END;
/

It is created...
but if i execute the function am not getting the correct value

ex:-
select fn_ceiling(1.75) from dual;

am getting the result as 1
(actaul result should be 1.500)

Dnt know what i did wrong?
AnswerRe: Loosing decimal values while selecting in Oracle Pin
Mycroft Holmes26-Jul-09 20:54
professionalMycroft Holmes26-Jul-09 20:54 
GeneralRe: Loosing decimal values while selecting in Oracle Pin
sandhya1426-Jul-09 21:06
sandhya1426-Jul-09 21:06 
Questionhow to do this result output Pin
VinothRao26-Jul-09 17:53
VinothRao26-Jul-09 17:53 
AnswerRe: how to do this result output Pin
Robin_Roy26-Jul-09 18:14
Robin_Roy26-Jul-09 18:14 
GeneralRe: how to do this result output Pin
VinothRao26-Jul-09 18:27
VinothRao26-Jul-09 18:27 
GeneralRe: how to do this result output Pin
dan!sh 26-Jul-09 18:56
professional dan!sh 26-Jul-09 18:56 
AnswerRe: how to do this result output Pin
Mycroft Holmes26-Jul-09 18:57
professionalMycroft Holmes26-Jul-09 18:57 
AnswerRe: how to do this result output Pin
J4amieC27-Jul-09 0:30
J4amieC27-Jul-09 0:30 
Questionsql statement help Pin
VinothRao26-Jul-09 15:56
VinothRao26-Jul-09 15:56 
AnswerRe: sql statement help Pin
Robin_Roy26-Jul-09 18:20
Robin_Roy26-Jul-09 18:20 
QuestionPassword in SqlServer 2005 Pin
SajjadZare25-Jul-09 18:58
SajjadZare25-Jul-09 18:58 
AnswerRe: Password in SqlServer 2005 Pin
Abhijit Jana25-Jul-09 22:32
professionalAbhijit Jana25-Jul-09 22:32 
AnswerRe: Password in SqlServer 2005 Pin
Mycroft Holmes26-Jul-09 14:11
professionalMycroft Holmes26-Jul-09 14:11 
GeneralRe: Password in SqlServer 2005 Pin
Andy_L_J26-Jul-09 20:00
Andy_L_J26-Jul-09 20:00 
Questionhow to show process in query of sqlserver 2005 Pin
vunhat25-Jul-09 7:25
vunhat25-Jul-09 7:25 
AnswerRe: how to show process in query of sqlserver 2005 Pin
Abhijit Jana25-Jul-09 10:08
professionalAbhijit Jana25-Jul-09 10:08 
GeneralRe: how to show process in query of sqlserver 2005 Pin
vunhat26-Jul-09 5:53
vunhat26-Jul-09 5:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.