Click here to Skip to main content
15,899,124 members
Home / Discussions / Database
   

Database

 
GeneralRe: Which index is good Pin
Pete O'Hanlon1-Feb-07 8:48
mvePete O'Hanlon1-Feb-07 8:48 
AnswerRe: Which index is good Pin
Colin Angus Mackay1-Feb-07 6:23
Colin Angus Mackay1-Feb-07 6:23 
QuestionIn Oracle, how can I get the views defined using a particular table Pin
nsurendran31-Jan-07 23:00
nsurendran31-Jan-07 23:00 
QuestionWhy is my T-SQL function considered non-deterministic? Pin
michal.kreslik31-Jan-07 22:16
michal.kreslik31-Jan-07 22:16 
AnswerRe: Why is my T-SQL function considered non-deterministic? Pin
Colin Angus Mackay1-Feb-07 2:31
Colin Angus Mackay1-Feb-07 2:31 
GeneralRe: Why is my T-SQL function considered non-deterministic? Pin
michal.kreslik1-Feb-07 6:09
michal.kreslik1-Feb-07 6:09 
AnswerRe: Why is my T-SQL function considered non-deterministic? Pin
Chris Meech1-Feb-07 8:01
Chris Meech1-Feb-07 8:01 
GeneralRe: Why is my T-SQL function considered non-deterministic? Pin
michal.kreslik1-Feb-07 8:40
michal.kreslik1-Feb-07 8:40 
Hello, Chris,

thanks for the link - but I have already read these guidelines before posting a question here.

Also, quite naturally, I have been testing my function whether it's returning the correct results according to the intended logic: and it does. Just for info, the logic behind this function is to return the number of minutes elapsed from the start of Forex trading session. The first minute of the forex trading session starts every week on Sunday at 17:00:01 EST. The inputs are DayOfWeek index (0 for Sunday thru 6 for Saturday) and hour, minute & second values.

The three different return statements are there because it makes the function work faster (which is a concern as I'm running that on an OLAP db with 255 million+ rows). The first condition is true for most input sets, so the function doesn't have to go thru all of the other logical branches.

I'm certain my function complies to the Microsoft definition of a "deterministic function":

Determinism

Deterministic functions always return the same result any time they are called with a
specific set of input values and given the same state of the database. Nondeterministic
functions may return different results each time they are called with a specific set of input
values even if the database state that they access remains the same.


Also, there's no trace of "endif" keyword in the T-SQL reference for IF..ELSE:

http://msdn2.microsoft.com/en-us/library/ms182717.aspx


So where might be the problem?

Thanks for help,
Michal
GeneralRe: Why is my T-SQL function considered non-deterministic? Pin
michal.kreslik1-Feb-07 9:07
michal.kreslik1-Feb-07 9:07 
GeneralRe: Why is my T-SQL function considered non-deterministic? Pin
michal.kreslik1-Feb-07 9:31
michal.kreslik1-Feb-07 9:31 
Answerthe solution Pin
michal.kreslik1-Feb-07 18:47
michal.kreslik1-Feb-07 18:47 
QuestionUpload a binary file with vb.net from an xml node Pin
orlija31-Jan-07 22:06
orlija31-Jan-07 22:06 
QuestionImplementing "Merge replication" in Vs.Net 2005 Pin
Spaz8031-Jan-07 21:57
Spaz8031-Jan-07 21:57 
QuestionSQL: how many type of Store Procedure parameter ? Pin
PavanPareta31-Jan-07 21:41
PavanPareta31-Jan-07 21:41 
AnswerRe: SQL: how many type of Store Procedure parameter ? Pin
Pete O'Hanlon1-Feb-07 0:05
mvePete O'Hanlon1-Feb-07 0:05 
GeneralRe: SQL: how many type of Store Procedure parameter ? Pin
PavanPareta1-Feb-07 1:10
PavanPareta1-Feb-07 1:10 
QuestionSQL: diffrence between Clustered and Non Clustered Indexing Pin
PavanPareta31-Jan-07 21:39
PavanPareta31-Jan-07 21:39 
AnswerRe: SQL: diffrence between Clustered and Non Clustered Indexing Pin
Pete O'Hanlon31-Jan-07 22:24
mvePete O'Hanlon31-Jan-07 22:24 
GeneralRe: SQL: diffrence between Clustered and Non Clustered Indexing Pin
PavanPareta31-Jan-07 23:35
PavanPareta31-Jan-07 23:35 
AnswerRe: SQL: diffrence between Clustered and Non Clustered Indexing Pin
michal.kreslik31-Jan-07 22:26
michal.kreslik31-Jan-07 22:26 
GeneralRe: SQL: diffrence between Clustered and Non Clustered Indexing Pin
PavanPareta31-Jan-07 23:31
PavanPareta31-Jan-07 23:31 
QuestionDatabase information Pin
John Gathogo31-Jan-07 21:00
John Gathogo31-Jan-07 21:00 
AnswerRe: Database information Pin
Pete O'Hanlon31-Jan-07 22:26
mvePete O'Hanlon31-Jan-07 22:26 
Questioncan we give more than one fielsd as primary key in a table Pin
anujose31-Jan-07 18:26
anujose31-Jan-07 18:26 
AnswerRe: can we give more than one fielsd as primary key in a table Pin
Guru bhai31-Jan-07 18:57
Guru bhai31-Jan-07 18:57 

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.