If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Passing SMALLDATETIME into a Stored Proc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-16-03, 21:06
ChrisWBates ChrisWBates is offline
Registered User
 
Join Date: Nov 2003
Posts: 21
Passing SMALLDATETIME into a Stored Proc

Hello people,

I am haivng an issue passing a smalldatetime into a stored proc.

The issue is on MSSQL to be valid, you have to enter it as

'2003-10-03 00:00:00'

This makes it into a stored proc with no issues,

but to be valid

I need something like this

select * from FIWORKING where DEALDATE > '@WINDOW'

I can't seem to get the ' to stick in the stored proc,
is there a way to protect it ??

Chris
Reply With Quote
  #2 (permalink)  
Old 11-16-03, 22:41
ChrisWBates ChrisWBates is offline
Registered User
 
Join Date: Nov 2003
Posts: 21
Hmm,

Got it to work by passing the datetime into the stored proc using the
below syntax

{ d '2003-31-11' }

Anyone know of another way to pass datetime into a Stored Proc ?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On