Click here to Skip to main content
15,892,005 members
Home / Discussions / Database
   

Database

 
GeneralRe: Connecting from ASP.Net to MySql Pin
Morten Abrahamsen24-Oct-02 19:48
Morten Abrahamsen24-Oct-02 19:48 
GeneralRe: Connecting from ASP.Net to MySql Pin
Smitha Nishant24-Oct-02 23:05
protectorSmitha Nishant24-Oct-02 23:05 
GeneralInstalling an Excel Driver Pin
José Luis Sogorb22-Oct-02 23:47
José Luis Sogorb22-Oct-02 23:47 
GeneralRe: Installing an Excel Driver Pin
Paul Riley23-Oct-02 0:31
Paul Riley23-Oct-02 0:31 
GeneralRe: Installing an Excel Driver Pin
José Luis Sogorb23-Oct-02 6:54
José Luis Sogorb23-Oct-02 6:54 
GeneralRe: Installing an Excel Driver Pin
Paul Riley23-Oct-02 7:36
Paul Riley23-Oct-02 7:36 
GeneralNeed help to write stored procedure Pin
Mazdak22-Oct-02 20:47
Mazdak22-Oct-02 20:47 
GeneralRe: Need help to write stored procedure Pin
Rein Hillmann22-Oct-02 21:12
Rein Hillmann22-Oct-02 21:12 
This should work:

<br />
-- create the test table<br />
create table t1(ID int, date1 datetime, date2 datetime)<br />
<br />
-- insert test rows<br />
insert into t1 (ID, date1, date2) values (1, '15 Jan 2001', '20 Feb 2003')<br />
insert into t1 (ID, date1, date2) values (2, '01 Sep 2000', '19 Apr 2001')<br />
<br />
-- drop the proc if it exists<br />
if object_id('sp_CheckDates') is not null drop procedure sp_CheckDates<br />
go<br />
-- create the proc<br />
create procedure sp_CheckDates @ID int<br />
as<br />
declare @Date1 datetime<br />
declare @Date2 datetime<br />
select @Date1 = date1, @Date2 = date2 from t1 where ID = @ID<br />
<br />
if @Date1 is not null and @Date2 is not null begin<br />
	if datediff(dd, @Date1, getdate()) > 0 and datediff(dd, @Date2, getdate()) < 0 begin<br />
		print 'Bingo!'<br />
		return 0<br />
	end else begin<br />
		raiserror ('Date not in specified range', 16, 1)<br />
		return 1<br />
	end <br />
end else begin<br />
	raiserror('Specified ID does not exist.', 16, 1)<br />
	return 1<br />
end<br />
go<br />
<br />
-- test execution<br />
exec sp_CheckDates @ID=1 <br />

GeneralRe: Need help to write stored procedure Pin
Mazdak23-Oct-02 3:34
Mazdak23-Oct-02 3:34 
GeneralRe: Need help to write stored procedure Pin
Richard Deeming22-Oct-02 23:17
mveRichard Deeming22-Oct-02 23:17 
GeneralRe: Need help to write stored procedure Pin
Mazdak23-Oct-02 3:33
Mazdak23-Oct-02 3:33 
QuestionAutomatic Import? Pin
Robby22-Oct-02 10:27
Robby22-Oct-02 10:27 
AnswerRe: Automatic Import? Pin
Richard Deeming22-Oct-02 23:21
mveRichard Deeming22-Oct-02 23:21 
AnswerRe: Automatic Import? Pin
Richard Deeming23-Oct-02 4:27
mveRichard Deeming23-Oct-02 4:27 
GeneralDroping constraints Pin
Dave Merrifield22-Oct-02 3:08
Dave Merrifield22-Oct-02 3:08 
GeneralProblem with ADO and MySQL Pin
Bash21-Oct-02 21:50
Bash21-Oct-02 21:50 
General@@Identity.....Help Me somebody Pin
GregoryF.21-Oct-02 20:17
sussGregoryF.21-Oct-02 20:17 
GeneralRe: @@Identity.....Help Me somebody Pin
Daniel Turini21-Oct-02 21:53
Daniel Turini21-Oct-02 21:53 
GeneralRe: @@Identity.....Help Me somebody Pin
Morten Abrahamsen22-Oct-02 1:37
Morten Abrahamsen22-Oct-02 1:37 
GeneralRe: @@Identity.....Help Me somebody Pin
Daniel Turini22-Oct-02 1:42
Daniel Turini22-Oct-02 1:42 
GeneralRe: @@Identity.....Help Me somebody Pin
Morten Abrahamsen22-Oct-02 1:48
Morten Abrahamsen22-Oct-02 1:48 
GeneralBinding null Dates Pin
Derek Lakin21-Oct-02 4:25
Derek Lakin21-Oct-02 4:25 
GeneralGetting the row count from a SQLDataReader Pin
Paul Watson21-Oct-02 4:22
sitebuilderPaul Watson21-Oct-02 4:22 
GeneralRe: Getting the row count from a SQLDataReader Pin
Ray Cassick21-Oct-02 6:42
Ray Cassick21-Oct-02 6:42 
GeneralRe: Getting the row count from a SQLDataReader Pin
Daniel Turini21-Oct-02 22:09
Daniel Turini21-Oct-02 22:09 

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.