3 Replies - 1191 Views - Last Post: 09 October 2012 - 12:58 AM

#1 wanabavbcoder  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 48
  • Joined: 08-October 12

multiple columns in a single table Stored Procedures in sql

Posted 08 October 2012 - 02:27 PM

Hi all, I am fairly new to sql 2000 and i would like to know if anyone could please help me on writing a stored proc.
I can write a simple one, but this has stumped me.

There are three columns in my table.
Venue_Name, Start_Date, End_Date

I need to use variables because I am going to use values from a Vb.net form
The date columns are going to be populated with a datetimepicker
i need a procedure to check the venue_name to the start_date and end_date.
How do i go about doing that? any ideas?

Is This A Good Question/Topic? 0
  • +

Replies To: multiple columns in a single table Stored Procedures in sql

#2 wanabavbcoder  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 48
  • Joined: 08-October 12

Re: multiple columns in a single table Stored Procedures in sql

Posted 08 October 2012 - 02:52 PM

Please assist me where you can with the code as i am not very fluent in sql
Was This Post Helpful? 0
  • +
  • -

#3 thava  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 180
  • View blog
  • Posts: 1,606
  • Joined: 17-April 07

Re: multiple columns in a single table Stored Procedures in sql

Posted 09 October 2012 - 12:14 AM

This is just a skeleton try to utilize this
CREATE PRCO <PROCNAME>
(
@VEnNAme varchar(200)
@SDate datetime,
@EndDate DateTime,
)
as
SELECT * FROM <yourTableNAme> 
Where <Frame your conditon here>


hope you got an idea
Was This Post Helpful? 1
  • +
  • -

#4 wanabavbcoder  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 48
  • Joined: 08-October 12

Re: multiple columns in a single table Stored Procedures in sql

Posted 09 October 2012 - 12:58 AM

View Postthava, on 09 October 2012 - 12:14 AM, said:

This is just a skeleton try to utilize this
CREATE PRCO <PROCNAME>
(
@VEnNAme varchar(200)
@SDate datetime,
@EndDate DateTime,
)
as
SELECT * FROM <yourTableNAme> 
Where <Frame your conditon here>


hope you got an idea


You are a star. It worked perfectly and now my code is executing and displaying what it needed to. Brilliant. KEEP IT UP
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1