Guys,
Using this query, i got an error. any idea guys.
what method should i used for this report.
Im using text queries instead of SP.
thanks.
The variable name '@FromDate' has already been declared. Variable names must be unique within a query batch or stored procedure.
Fromdate:'2012/06/01'
FromTime:12:00AM
Todate:'2012/06/29'
Totime:12:00PM
DECLARE @fromDateTime as datetime, @toDateTime as datetime
SET @fromdatetime = dbo.getCombinedDateTime(@fromDate,@fromTime)
SET @todatetime = dbo.getCombinedDateTime(@toDate,@toTime)
Select
v.JOURNALID
,v.TRANSDATE
,v.ITEMID
,v.QTY
,v.COSTAMOUNT
,v.JOURNALTYPE
,v.BOMLINE
From INVENTJOURNALTRANS v with (nolock)
Where v.TRANSDATE between @FromDatetime and @ToDatetime
and v.JOURNALTYPE=3
and v.BOMLINE=0