Click here to Skip to main content
15,917,568 members
Home / Discussions / Database
   

Database

 
QuestionSelect employees haveing thier birthday with in coming 2 weeks Pin
Vipin.d26-Jul-07 5:52
Vipin.d26-Jul-07 5:52 
AnswerRe: Select employees haveing thier birthday with in coming 2 weeks Pin
andyharman26-Jul-07 6:43
professionalandyharman26-Jul-07 6:43 
GeneralRe: Select employees haveing thier birthday with in coming 2 weeks Pin
Vipin.d27-Jul-07 20:47
Vipin.d27-Jul-07 20:47 
AnswerRe: Select employees haveing thier birthday with in coming 2 weeks Pin
Pete O'Hanlon26-Jul-07 8:53
mvePete O'Hanlon26-Jul-07 8:53 
GeneralRe: Select employees haveing thier birthday with in coming 2 weeks Pin
Vipin.d27-Jul-07 20:26
Vipin.d27-Jul-07 20:26 
GeneralRe: Select employees haveing thier birthday with in coming 2 weeks Pin
Pete O'Hanlon29-Jul-07 10:15
mvePete O'Hanlon29-Jul-07 10:15 
AnswerRe: Select employees haveing thier birthday with in coming 2 weeks Pin
Vipin.d27-Jul-07 20:48
Vipin.d27-Jul-07 20:48 
QuestionProblem with calling Scalar Function Pin
--miCZar--26-Jul-07 3:55
--miCZar--26-Jul-07 3:55 
Hi there,

I have problem with caling my T-SQL scalar function.

SET ANSI_NULLS ON<br />
SET QUOTED_IDENTIFIER ON<br />
GO<br />
<br />
-- =============================================<br />
-- Author:		<Author,,Name><br />
-- Create date: <Create Date, ,><br />
-- Description:	<Description, ,><br />
-- =============================================<br />
CREATE FUNCTION dbo.func(@param int)<br />
RETURNS bit<br />
AS<br />
BEGIN<br />
	DECLARE @ret bit;<br />
<br />
	IF EXISTS (SELECT id FROM [dbo].myTmpTab WHERE id=@param)<br />
		BEGIN<br />
			set @ret=1;<br />
		END<br />
	ELSE<br />
		BEGIN<br />
			set @ret=0;<br />
		END<br />
	RETURN @ret;<br />
END<br />
GO


I want to call it in C# code, but i cant it even call in MSSQL Server Mamagment Studio (SELECT myTmpDB.dbo.func(1)) and i get this msg:

Msg 557, Level 16, State 2, Line 1<br />
Only functions and extended stored procedures can be executed from within a function.


Is there any1 who know how to solve it? Im quite sure it would work on Sybase as i have done smthin similar about year ago Smile | :)

-------------------
n00b @ pr0grAmiNg

AnswerRe: Problem with calling Scalar Function Pin
Blue_Boy26-Jul-07 4:13
Blue_Boy26-Jul-07 4:13 
GeneralRe: Problem with calling Scalar Function Pin
--miCZar--26-Jul-07 22:25
--miCZar--26-Jul-07 22:25 
AnswerRe: Problem with calling Scalar Function Pin
andyharman26-Jul-07 6:54
professionalandyharman26-Jul-07 6:54 
GeneralRe: Problem with calling Scalar Function Pin
--miCZar--26-Jul-07 22:27
--miCZar--26-Jul-07 22:27 
AnswerRe: Problem with calling Scalar Function Pin
Pete O'Hanlon26-Jul-07 9:41
mvePete O'Hanlon26-Jul-07 9:41 
Questioninserting values by checking the existing values Pin
dsaikrishna26-Jul-07 2:30
dsaikrishna26-Jul-07 2:30 
AnswerRe: inserting values by checking the existing values Pin
Mubashir Javaid26-Jul-07 2:42
Mubashir Javaid26-Jul-07 2:42 
Questiongetting second highest date from a sql table Pin
hkchauhan26-Jul-07 2:16
hkchauhan26-Jul-07 2:16 
AnswerRe: getting second highest date from a sql table Pin
Krish - KP26-Jul-07 2:21
Krish - KP26-Jul-07 2:21 
AnswerRe: getting second highest date from a sql table Pin
hk7792126-Jul-07 2:34
hk7792126-Jul-07 2:34 
Questioninserting values by checking the existing values Pin
dsaikrishna26-Jul-07 2:12
dsaikrishna26-Jul-07 2:12 
AnswerRe: inserting values by checking the existing values Pin
Eliz.k27-Jul-07 0:20
Eliz.k27-Jul-07 0:20 
QuestionHiding Report Parameters. Pin
Karuna Kumar26-Jul-07 0:34
Karuna Kumar26-Jul-07 0:34 
QuestionStored Procedure Issue Pin
Brendan Vogt26-Jul-07 0:00
Brendan Vogt26-Jul-07 0:00 
AnswerRe: Stored Procedure Issue Pin
Mike Dimmick26-Jul-07 0:46
Mike Dimmick26-Jul-07 0:46 
GeneralRe: Stored Procedure Issue Pin
Colin Angus Mackay26-Jul-07 0:52
Colin Angus Mackay26-Jul-07 0:52 
AnswerRe: Stored Procedure Issue Pin
Colin Angus Mackay26-Jul-07 0:48
Colin Angus Mackay26-Jul-07 0:48 

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.