ALTER PROCEDURE [dbo].[sp_PaymentRegisterGridView]
(
-- @WhereCondition nvarchar(4000)
@dRPDate DateTime
)
AS
begin
-- declare @sqlQuery nvarchar(4000);
-- set @sqlQuery='
SELECT
ACC.dRPDate DATE,
ACC.cVType TYPE,
TS.vSeries SERIES,
ACC.iRPNo VOUCHERNO,
ACM.vAcName HEAD,
ACC.vNarration NARRATION,
ACC.deDRAmount DEBIT,
ACC.deCRAmount CREDIT
FROM tbl_Acc_Voucher AS ACC INNER JOIN
tblSerialNumbers AS TS ON ACC.iSeriesId = TS.iSeriesId INNER JOIN
tbl_Acc_AccountMaster AS ACM ON ACM.iAcID = ACC.iAcID
where ACC.dRPDate=@dRPDate
-- +@WhereCondition
--
-- exec sp_executesql @sqlQuery
-- end
-- RETURN
end
Loading
Kunal VaishyaPosted Jul 6, 2013, 3:44 AM
use this in where condition
Cast(ACC.dRPDate as DateTime) = Cast(@dRPDate as DateTime)
try
Iftikar HussainPosted Jul 6, 2013, 2:43 AM
Regards,
Iftikar
Iftikar HussainPosted Jul 6, 2013, 2:42 AM
Is this happening for any date value or specific date value?
Please check directly by using like this
Regards,
Iftikar
Sanjeeb LenkaPosted Jul 6, 2013, 2:22 AM
-sample value what you are passing to @dRPDate
-one value from your table column dRPDate
plz paste these details so we can able to solve your problem
Ravi ShekharPosted Jul 6, 2013, 1:48 AM
Check below code!!!
http://msdn.microsoft.com/en-us/library/ms187928.aspx
for sqldatetime code...
MANEESH ANPosted Jul 6, 2013, 1:07 AM
Sanjeeb LenkaPosted Jul 6, 2013, 1:01 AM