Click here to Skip to main content
15,920,217 members
Home / Discussions / Database
   

Database

 
GeneralRe: How to find table in Access databse??? Pin
Rohan_bhat_3121-Oct-05 0:03
Rohan_bhat_3121-Oct-05 0:03 
GeneralRe: How to find table in Access databse??? Pin
S Douglas21-Oct-05 0:19
professionalS Douglas21-Oct-05 0:19 
QuestionList of databases on mySQL server Pin
Golden Dragon9-Oct-05 14:08
Golden Dragon9-Oct-05 14:08 
QuestionMySQL - delete current row Pin
Junyor9-Oct-05 11:50
Junyor9-Oct-05 11:50 
Questionperformance? Pin
hassan azizi8-Oct-05 17:03
hassan azizi8-Oct-05 17:03 
QuestionSystem DB Pin
Ranoush7-Oct-05 21:55
Ranoush7-Oct-05 21:55 
AnswerRe: System DB Pin
S Douglas20-Oct-05 23:33
professionalS Douglas20-Oct-05 23:33 
QuestionGenerate Create Script will not show up in Database Project in VS.NET Pin
Pitchiah4u7-Oct-05 21:38
Pitchiah4u7-Oct-05 21:38 
Questioncheckbox in datagrid Pin
ahager7-Oct-05 7:07
ahager7-Oct-05 7:07 
QuestionManagment studio Pin
Bueto7-Oct-05 3:52
Bueto7-Oct-05 3:52 
AnswerRe: Managment studio Pin
Bueto9-Oct-05 22:54
Bueto9-Oct-05 22:54 
QuestionSQL Pin
shoaibnawaz6-Oct-05 10:34
shoaibnawaz6-Oct-05 10:34 
AnswerRe: SQL Pin
Colin Angus Mackay6-Oct-05 12:35
Colin Angus Mackay6-Oct-05 12:35 
GeneralRe: SQL Pin
shoaibnawaz7-Oct-05 11:50
shoaibnawaz7-Oct-05 11:50 
GeneralRe: SQL Pin
shoaibnawaz7-Oct-05 12:09
shoaibnawaz7-Oct-05 12:09 
GeneralRe: SQL Pin
Colin Angus Mackay7-Oct-05 13:12
Colin Angus Mackay7-Oct-05 13:12 
QuestionSQL Performance Question Pin
jgallen236-Oct-05 8:29
jgallen236-Oct-05 8:29 
AnswerRe: SQL Performance Question Pin
Colin Angus Mackay6-Oct-05 9:11
Colin Angus Mackay6-Oct-05 9:11 
GeneralRe: SQL Performance Question Pin
jgallen236-Oct-05 9:17
jgallen236-Oct-05 9:17 
QuestionExecuting SQL Script File Pin
KragAapie5-Oct-05 19:32
KragAapie5-Oct-05 19:32 
AnswerRe: Executing SQL Script File Pin
Colin Angus Mackay5-Oct-05 21:59
Colin Angus Mackay5-Oct-05 21:59 
QuestionHow to call stored procedure from update statement Pin
iluha5-Oct-05 15:54
iluha5-Oct-05 15:54 
AnswerRe: How to call stored procedure from update statement (edit) Pin
Nic Rowan6-Oct-05 1:55
Nic Rowan6-Oct-05 1:55 
Hi,

I think a user defined function would work better for what you are trying to do (a SCALAR FUNCTION in this case)

CREATE FUNCTION dbo.udfGetSeconds (@Days INT)
	RETURNS INT

AS

BEGIN
	DECLARE @Seconds INT
	
	SET @Seconds = @Days * 24 * 60 * 60
	
	RETURN @Seconds
END


Then use it as follows

SELECT dbo.udfGetSeconds(5)

(edit)

or in an UPDATE statement

UPDATE [Table] SET [column] = dbo.udfGetSeconds(5)

(edit)



The man who smiles when things go wrong has thought of someone he can blame it on.

If you tell a man there are 300 billion stars in the universe, he'll believe you. But if you tell him a bench has just been painted, he'll have to touch it to be sure.





-- modified at 8:03 Thursday 6th October, 2005
QuestionImport/Export in MS Access Pin
suzie1005-Oct-05 8:38
suzie1005-Oct-05 8:38 
QuestionHelp with Cursors in Stored Procedures Pin
jszpila5-Oct-05 6:33
jszpila5-Oct-05 6:33 

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.