Showing posts with label searching. Show all posts
Showing posts with label searching. Show all posts

Sunday, March 25, 2012

default datetime error

hi friends,

i have two datetime parameters in my report ... based on these parameters , am searching records ... the issue is i cant get the full datetime value

for example

i am searching records based on 03/16/2007 and 03/20/2007... i can't the records for the date 03/20/2007...

bcoz, the value of the date is '03/20/2007 00:00:00.000'

i want to get the value like this ' 03/20/2007 11:59:59 pm''

can any one help me

You can specify the time part for the parameter and retrieve the records. I mean, you can type 3/20/2007 11:59:59 PM in the parameter field.

Shyam

|||

but the issue is i just want to give my date only... like this 3/20/2007

... it has to take the time by default 11:59:59 PM ....

|||

You have to specify the expression for your date parameter in dataset. For example, if your parameter name is @.to_date in your stored procedure, the report parameter name would be to_date.

Go to Data tab and select the appropriate dataset from the dropdown and then click the Edit (...) button besides it. Go to Parameters tab and for the @.to_date parameter, give the expression for Value as:

=DateAdd(DateInterval.Second, -1, DateAdd(DateInterval.Day, 1, Parameters!to_date.Value))

This will add 1 day to your given date and then subtract 1 second from that date and this value will be passed on to the stored procdure or SQL query (whichever you have used)

Shyam

|||i am pleased to thank you shyam...thanx for your help .. i have implemented ...|||

I know this solution is definitely working. But just wanted to be perfect on this. :-) The "correct" way to do something like this is to offset 3 milliseconds instead of 1 second. HTH.

Friday, February 17, 2012

Debug stored procedure

Hi NG,
I have spent 3 days searching on how to debug stored procedure in MSS 2005
but it keeps mentioning VS 2005. Does this mean that I have to buy VS 2005
just to debug a TSQL stored procedure?
Micorosoft, what have you done on the debug feature of MSS 2000 why is there
no simple way to debug a stored procedure in MSS 2005 just like in MSS 2000.
You should feel sorry for this BILL!
Regards,
Well, coming from SQL Server 7 and the only debug feature available
"PRINT":
I'm only using Ms SQL Server Managment Studio (a free version is
available for
SQL Server Express - or else it's bundled...)
Now, if you create the SP on the client - that's a whole different
bag, and
I will resist the urge to ask: why do you do that...?
Nah, anyways:
Test the SP in a query window.
/o
On Jun 4, 12:11 pm, "Praetorian Guard" <praetor...@.gatekeeper.com>
wrote:
> Hi NG,
> I have spent 3 days searching on how to debug stored procedure in MSS 2005
> but it keeps mentioning VS 2005. Does this mean that I have to buy VS 2005
> just to debug a TSQL stored procedure?
> Micorosoft, what have you done on the debug feature of MSS 2000 why is there
> no simple way to debug a stored procedure in MSS 2005 just like in MSS 2000.
> You should feel sorry for this BILL!
> Regards,
|||Yes, in SQL Server 2005 you need Visual Studio. Microsoft has said that
they will add it back into Management Studio with Katmai (a.k.a. SQL Server
2008).
In the meantime, PRINT statements are helpful if you cannot use VS. Or,
create a DebuggingTable and INSERT into it useful state information and a
datetime.
CREATE TABLE DebuggingTable
(ID INT IDENTITY, -- used to order the rows for you when you query
DebugLine NVARCHAR(1000),
DebugTime DATETIME,
SPID INT,
SID VARBINARY(85))
RLF
"Praetorian Guard" <praetorian@.gatekeeper.com> wrote in message
news:eQCooCppHHA.1244@.TK2MSFTNGP04.phx.gbl...
> Hi NG,
> I have spent 3 days searching on how to debug stored procedure in MSS
> 2005 but it keeps mentioning VS 2005. Does this mean that I have to buy VS
> 2005 just to debug a TSQL stored procedure?
> Micorosoft, what have you done on the debug feature of MSS 2000 why is
> there no simple way to debug a stored procedure in MSS 2005 just like in
> MSS 2000. You should feel sorry for this BILL!
> Regards,
>
|||ApexSQL is coming out with a debugger in their Edit program soon. I think
Embarcadero has one in their RapidSQL app too, although I don't know if it
is 2005 capable.
TheSQLGuru
President
Indicium Resources, Inc.
"Praetorian Guard" <praetorian@.gatekeeper.com> wrote in message
news:eQCooCppHHA.1244@.TK2MSFTNGP04.phx.gbl...
> Hi NG,
> I have spent 3 days searching on how to debug stored procedure in MSS
> 2005 but it keeps mentioning VS 2005. Does this mean that I have to buy VS
> 2005 just to debug a TSQL stored procedure?
> Micorosoft, what have you done on the debug feature of MSS 2000 why is
> there no simple way to debug a stored procedure in MSS 2005 just like in
> MSS 2000. You should feel sorry for this BILL!
> Regards,
>
|||On Mon, 4 Jun 2007 18:11:00 +0800, Praetorian Guard wrote:

>Hi NG,
>I have spent 3 days searching on how to debug stored procedure in MSS 2005
>but it keeps mentioning VS 2005. Does this mean that I have to buy VS 2005
>just to debug a TSQL stored procedure?
>Micorosoft, what have you done on the debug feature of MSS 2000 why is there
>no simple way to debug a stored procedure in MSS 2005 just like in MSS 2000.
>You should feel sorry for this BILL!
>Regards,
>
Hi Praetorian,
There is a request to bring back the debugger in SSMS on Connect (URLs
below). Even though Microsoft has promised to implement this feature in
Katmai, I still urge everyone who didn't already do so, to vote for this
feature - just to make sure that they don't forget their promises...
http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=124550
http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=124613
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|||I suggest you try the tool SQL Ultimate Debugger:
http://lakesidesql.com/downloads/PFD/1_0_2007_809/PFDebugger_Setup_08-09-2007.zip.
This tool is a post factum debugger and allows you to trace and
debug obejcts (SP's Triggers, FN's, etc.) that had been executed. It's
waaaay better than the T-SQL debugger in VS. Also, since this software has
not yet been officially realeased, I would not recommend (YET) to use it in
a production environment.
You can learn more about it here:
http://208.75.249.50/products/sql-ultimate-debugger/screenshots.html.
"Praetorian Guard" <praetorian@.gatekeeper.com> wrote in message
news:eQCooCppHHA.1244@.TK2MSFTNGP04.phx.gbl...
> Hi NG,
> I have spent 3 days searching on how to debug stored procedure in MSS
> 2005 but it keeps mentioning VS 2005. Does this mean that I have to buy VS
> 2005 just to debug a TSQL stored procedure?
> Micorosoft, what have you done on the debug feature of MSS 2000 why is
> there no simple way to debug a stored procedure in MSS 2005 just like in
> MSS 2000. You should feel sorry for this BILL!
> Regards,
>