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

Database

 
Questionhow to read an excel file in sql server 2000 Pin
Amit Sk Sharma9-Jul-07 22:00
Amit Sk Sharma9-Jul-07 22:00 
AnswerRe: how to read an excel file in sql server 2000 Pin
Paul Conrad13-Jul-07 11:51
professionalPaul Conrad13-Jul-07 11:51 
QuestionORA-12505 [modified] Pin
Shajeel9-Jul-07 21:52
Shajeel9-Jul-07 21:52 
AnswerRe: ORA-12505 Pin
andyharman11-Jul-07 3:16
professionalandyharman11-Jul-07 3:16 
GeneralRe: ORA-12505 Pin
Shajeel11-Jul-07 18:27
Shajeel11-Jul-07 18:27 
QuestionConnection problem pls help Pin
micydon9-Jul-07 21:39
micydon9-Jul-07 21:39 
AnswerRe: Connection problem pls help Pin
Paul Conrad13-Jul-07 11:53
professionalPaul Conrad13-Jul-07 11:53 
QuestionHelp needed for an user defined Function Pin
Exelioindia9-Jul-07 21:14
Exelioindia9-Jul-07 21:14 
Hi all,

I am new to SQL user defined function, I wrote an function on my own, I creates this function to get the count of total records available in an speciifed country, it works well, but where is no record in a specified country, it returs NULL and row count as 1. The function which i written is as below

CREATE FUNCTION [dbo].[cnt_country] (@country varchar(12))
RETURNS varchar(5) AS
BEGIN
declare @row_count varchar(5)
select @row_count=[country_code] from [dbo].[countrywise_users]
where [country_code]=@country
return @row_count
END

Actually i need to get the total row's available based on a country. If there is no records for an country , it should return null. Plz any one help me...

Thanks in advance


Know is Drop, Unknown is Ocean

AnswerRe: Help needed for an user defined Function Pin
WoutL9-Jul-07 22:53
WoutL9-Jul-07 22:53 
GeneralRe: Help needed for an user defined Function Pin
Exelioindia9-Jul-07 23:02
Exelioindia9-Jul-07 23:02 
AnswerRe: Help needed for an user defined Function Pin
gauthee9-Jul-07 23:26
gauthee9-Jul-07 23:26 
QuestionRight Outer Join Probs... Pin
Member 38798819-Jul-07 20:19
Member 38798819-Jul-07 20:19 
QuestionPassing an array to stored procedures Pin
M. J. Jaya Chitra9-Jul-07 18:40
M. J. Jaya Chitra9-Jul-07 18:40 
AnswerRe: Passing an array to stored procedures Pin
Sathesh Sakthivel9-Jul-07 19:16
Sathesh Sakthivel9-Jul-07 19:16 
QuestionQuery Insert Date? Pin
Vodstok9-Jul-07 16:14
Vodstok9-Jul-07 16:14 
AnswerRe: Query Insert Date? Pin
Frank Kerrigan16-Jul-07 2:32
Frank Kerrigan16-Jul-07 2:32 
QuestionQuery probs............., Pin
Member 38798819-Jul-07 3:36
Member 38798819-Jul-07 3:36 
AnswerRe: Outer join problem Pin
andyharman9-Jul-07 6:49
professionalandyharman9-Jul-07 6:49 
GeneralRe: Outer join problem Pin
Member 38798819-Jul-07 19:07
Member 38798819-Jul-07 19:07 
Questionhow to connect a database in sql with vb6 application Pin
treem jone9-Jul-07 1:42
treem jone9-Jul-07 1:42 
AnswerRe: how to connect a database in sql with vb6 application Pin
Pete O'Hanlon9-Jul-07 1:48
mvePete O'Hanlon9-Jul-07 1:48 
AnswerRe: how to connect a database in sql with vb6 application Pin
Sven Cipido9-Jul-07 20:23
Sven Cipido9-Jul-07 20:23 
QuestionCreation of table Pin
Ashish Vohra9-Jul-07 1:33
Ashish Vohra9-Jul-07 1:33 
AnswerRe: Creation of table Pin
SHatchard9-Jul-07 2:02
SHatchard9-Jul-07 2:02 
AnswerRe: Creation of table Pin
sam#9-Jul-07 2:05
sam#9-Jul-07 2:05 

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.