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

Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 5, 2013, 9:01 PM EDT
MANEESH AN110 reputationPosted Jul 5, 2013, 9:07 PM EDT
Ravi ShekharRank #673 · 3.6K reputationPosted Jul 5, 2013, 9:48 PM EDT
Check below code!!!
http://msdn.microsoft.com/en-us/library/ms187928.aspx
for sqldatetime code...
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 5, 2013, 10:22 PM EDT
-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
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 5, 2013, 10:42 PM EDT
Is this happening for any date value or specific date value?
Please check directly by using like this
Regards,
Iftikar
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 5, 2013, 10:43 PM EDT
Regards,
Iftikar
Kunal VaishyaRank #990 · 2K reputationPosted Jul 5, 2013, 11:44 PM EDT
use this in where condition
Cast(ACC.dRPDate as DateTime) = Cast(@dRPDate as DateTime)
try