SQL Server Forums - How to retrieve Job status for running jobs ?
Mine does a slightly different thing, in that it was firstly designed to list failing jobs across a number of servers (server names are maintained in a table.) I'm now trying to expand it to cover jobs that are still running, hence hit the same problem.. I notice some people are coding dynamic server names so that can reference linked servers which isn't practical for a server farm.I use a wrapper procedure for commands that return data
Maybe that should be another article, but you seem to have a gift for simplifying your articles so I would nice to see you break the proper usage down as well. For Example, SELECT UPPER('this is Lower TEXT') Output:THIS IS LOWER TEXTMessage to All Silver Member and Above This Table of Contents and Article is editable by all Silver members and above
Best approach to remove time part of datetime in SQL Server - Stack Overflow
If using a UDF, it should be noted that you should try to avoid using the UDF as part of a WHERE clause in a query as this will greatly hinder performance of the query. Edit, Jan 2012 A worked example of how flexible this is: Need to calculate by rounded time or date figure in sql server Edit, May 2012 Do not use this in WHERE clauses and the like without thinking: adding a function or CAST to a column invalidates index usage
Nonetheless, I usually use Method 1 (CONVERT function) because it is compatible with different versions of SQL SERVER and also the performance is better than other two. Fill in your details below or click an icon to log in: Email (required) (Address never made public) Name (required) Website You are commenting using your WordPress.com account
In .NET applications, you can usually format dates in data bound controls using the GUI interface, and you can also format things using the ToString() method of a true datetime value and specify all kinds of simple yet flexible formatting strings. Isn't it much easier to simply right-click on something and then enter a simple "mmm dd, yyyy" format string instead of building and parsing this manually using CONVERT and SUBSTRING parsing in T-SQL? Isn't it more flexible to do all formatting at your presentation layer so that you can just return data from your database and not worry about how it looks? Then 5 different clients can query the same stored procedure and each output those dates any way they want -- without changing any database code
Definately not if you're going to convert it back to a DateTime afterwards.It basically shows either a lack of knowledge, or complete disregard, for what is actually happening 'under the hood'. is there another option for formatting? BLOGERCISE Sep 1, 2009 at 11:03 AM 1 Comments Apologies if someone mentioned it, I'm not reading all the comments lol! But do you even need the floor?Select CAST(cast( GETDATE() AS INT ) AS DATETIME) Nic Sep 1, 2009 at 11:53 AM 10 Comments Converting to INT doesn't work in all cases as it will round up to the following day for timestamps after 12:00 noon
any person entering teh gate after 8:45 is marked late and any person leaving before 4:10 is marked early out hence for each day that the person has left early or come late i have to show days in whole numbers as 1,2 ,3 etc for the above columns(early out and late in).. my weekly reports should contain the columns employeeid employee name no of days late no of days early out the start day and end dates are provided by the user at run time using a datepicker in vs2005
This is working fine but I also need to include in the result of the query days of the month where a transaction did NOT take place, those days should show as zero when counted.. The method he suggested was to use SELECT DATEADD(D, 0, DATEDIFF(D, 0, GETDATE())) I approved his method though, I finally suggested my method using function CONVERT
No comments:
Post a Comment