Click here to Skip to main content
16,014,882 members
Home / Discussions / Database
   

Database

 
AnswerRe: Syntax I Can't Understand Pin
dotnetSong6-Jun-07 19:08
dotnetSong6-Jun-07 19:08 
GeneralRe: Syntax I Can't Understand Pin
Richard Andrew x646-Jun-07 19:36
professionalRichard Andrew x646-Jun-07 19:36 
QuestionUnique Long ID's in SQL Server 2005 Pin
Mike L.6-Jun-07 14:14
Mike L.6-Jun-07 14:14 
AnswerRe: Unique Long ID's in SQL Server 2005 Pin
Mike Dimmick6-Jun-07 14:49
Mike Dimmick6-Jun-07 14:49 
GeneralRe: Unique Long ID's in SQL Server 2005 Pin
Mike L.6-Jun-07 15:55
Mike L.6-Jun-07 15:55 
QuestionUpdating a record with DBTIMESTAMP in C++ Pin
Mark Kunkel6-Jun-07 9:48
Mark Kunkel6-Jun-07 9:48 
AnswerRe: Updating a record with DBTIMESTAMP in C++ Pin
Mike Dimmick6-Jun-07 11:45
Mike Dimmick6-Jun-07 11:45 
QuestionMust declare the scalar variable "@date"???? Pin
gritter6-Jun-07 8:31
gritter6-Jun-07 8:31 
I am trying to a create a stored procedure that accepts 4 input parameters. These parameter are used in the where clause of a select query to return a record from a sql server 2005 database. The record is the result of a three table join. I am getting an error "Must declare the scalar variable '@date'" If I re-arrange the order of the parameter-catching variables, the error will always list the first of the four. I googled the error message and couldn't find anything that helped. I wrote this based on examples in a couple books. And I don't think what I am trying to do is that uncommon.

Can someone please point me in the right direction. I am fairly knew at this.

-----------

use oee
go
create procedure dbo.sp_GetDowntime
@date smalldatetime
@dept nvarchar(3)
@equip nvarchar(25)
@shift nchar(1)
as
SELECT h.oee_date, h.dept, h.equip, h.oee_shift, d.dt_reason, r.name, d.min
FROM userdata_header h
INNER JOIN userdata_downtime d ON h.dept = d.dept AND h.oee_date = d.oee_date AND
userdata_header.equip = userdata_downtime.equip AND h.oee_shift = d.oee_shift
INNER JOIN refer_dt r ON d.dt_reason = r.dt_reasonID
WHERE h.oee_date = @date, h.dept = @dept and h.equip = @equip and h.shift = @shift

AnswerRe: Must declare the scalar variable "@date"???? Pin
andyharman6-Jun-07 8:51
professionalandyharman6-Jun-07 8:51 
GeneralRe: Must declare the scalar variable "@date"???? Pin
gritter6-Jun-07 9:25
gritter6-Jun-07 9:25 
QuestionHow to move existing controls to access form groupbox? Pin
Dan Neely6-Jun-07 5:44
Dan Neely6-Jun-07 5:44 
AnswerRe: How to move existing controls to access form groupbox? Pin
Giorgi Dalakishvili6-Jun-07 5:54
mentorGiorgi Dalakishvili6-Jun-07 5:54 
GeneralRe: How to move existing controls to access form groupbox? Pin
Dan Neely6-Jun-07 7:18
Dan Neely6-Jun-07 7:18 
AnswerRe: How to move existing controls to access form groupbox? Pin
Mike Dimmick6-Jun-07 11:47
Mike Dimmick6-Jun-07 11:47 
Questionhow to know the datatype of a field in a database? Pin
kalaveer6-Jun-07 2:15
kalaveer6-Jun-07 2:15 
AnswerRe: how to know the datatype of a field in a database? Pin
andyharman6-Jun-07 2:53
professionalandyharman6-Jun-07 2:53 
GeneralRe: how to know the datatype of a field in a database? Pin
kalaveer6-Jun-07 3:33
kalaveer6-Jun-07 3:33 
GeneralRe: how to know the datatype of a field in a database? Pin
andyharman6-Jun-07 3:38
professionalandyharman6-Jun-07 3:38 
AnswerRe: how to know the datatype of a field in a database? Pin
ScottM16-Jun-07 5:09
ScottM16-Jun-07 5:09 
Questiondate functions Pin
rkherath6-Jun-07 0:16
rkherath6-Jun-07 0:16 
AnswerRe: date functions Pin
ganesamoorthidhayalan6-Jun-07 1:05
ganesamoorthidhayalan6-Jun-07 1:05 
GeneralRe: date functions Pin
rkherath6-Jun-07 1:17
rkherath6-Jun-07 1:17 
GeneralRe: date functions Pin
ganesamoorthidhayalan6-Jun-07 1:23
ganesamoorthidhayalan6-Jun-07 1:23 
AnswerRe: date functions Pin
ganesamoorthidhayalan6-Jun-07 1:55
ganesamoorthidhayalan6-Jun-07 1:55 
AnswerRe: date functions Pin
Krish - KP7-Jun-07 22:40
Krish - KP7-Jun-07 22:40 

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.