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

Database

 
AnswerRe: Which index is good Pin
Pete O'Hanlon31-Jan-07 23:20
mvePete O'Hanlon31-Jan-07 23:20 
GeneralRe: Which index is good Pin
andyharman1-Feb-07 0:04
professionalandyharman1-Feb-07 0:04 
GeneralRe: Which index is good Pin
Pete O'Hanlon1-Feb-07 0:08
mvePete O'Hanlon1-Feb-07 0:08 
AnswerRe: Which index is good Pin
andyharman1-Feb-07 4:58
professionalandyharman1-Feb-07 4:58 
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 
Hello,

I am attempting to create an autocomputed column with persisted values. The column's value is defined by this function:

CREATE FUNCTION [dbo].[GetMinsFromSStart] 
(
	@DayOfWeekID tinyint,
	@Hour tinyint,
	@Minute tinyint,
	@Second tinyint
)
returns smallint
as
begin
	declare @MinsFromSessionStart smallint;

	set @MinsFromSessionStart = 420 + (@DayOfWeekID - 1) * 1440 + @Hour * 60 + @Minute;

	if (@Second > 0)
		set @MinsFromSessionStart = @MinsFromSessionStart + 1;

    if (@MinsFromSessionStart > 0)
		return @MinsFromSessionStart;
	else if (@MinsFromSessionStart < 0)
		begin
			set @MinsFromSessionStart = 10080 + @MinsFromSessionStart;
	        return @MinsFromSessionStart;
		end
	
	return 10080;
end


Unfortunately, I am getting this error:

'Tick' table
- Unable to modify table.  
Computed column 'MinsFromSStart' in table 'Tmp_Tick' cannot be persisted because the column is non-deterministic.


Why is the above function considered non-deterministic?

Thank you for any input,
Michal Kreslik
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 
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 

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.