Hello,
First of all, I apologize for not checking out the posts first hand before asking this question but I'm kind of on a deadline so here goes.
I'm trying to copy a database from a production server to a test server including the production server's master database. Since the production...
I actually just need up to the minute. Milliseconds don't matter for my purpose. I would have just converted it to hh:mm for reporting purposes, and since hh is only up to 24hrs, I had to use the day as well for other people to understand.
Thanks, all you guys for your help! I was able to...
Sorry... posted too soon as well... This is the most concise set of statements I can come up with.
SELECT sequence AS Ticket_No, hd_ccdt01 AS Start_time, hd_ccdt02 AS End_time,
(SELECT Convert(varchar(5), datediff(ss,hd_ccdt01,hd_ccdt02) / 86400) + 'd '
+...
All your feedback is enlightening guys and I'm learning a lot!
Karl, I treated your comment as a challenge so I modified it somewhat and here's what I ended up with that's working:
SELECT sequence AS Ticket_No, hd_ccdt01 AS Start_time, hd_ccdt02 AS End_time,
(SELECT...
...RETURN @DHMS
END
The function was parsed and ran successfully. I then used below to try it on the records.
select *,dbo.fn_CalcDuration(hd_ccdt01,hd_ccdt02) as duration from _smdba_._telmaste_
But then when I looked at the duration column, it's not giving out the supposed output. It's...
Obislavu,
can the result in your function be more than 24hrs? I sampled the function and it returned the value *:57:05. Why is the first parameter only an asterisk? It's not showing the hour at all...
Thanks,
Louie
Louie C.
ESquared,
I hope I'm not deviating from the thread. I'm not very good at SQL and also need help. I also am having issues with converting to the data type I need. I've used datediff as follows:
select
sec=convert(varchar(8),datediff(ss,[date open],getdate()),108)
from _smdba_._telmaste_...
Hello,
I'd like to ask for your help, I'm not very good in SQL syntax.
I need to get the total time between field1 and field2 with format 10/14/2004 3:06:08 AM and post the result in format dd:hh:mm. Very much like how it is in Excel.
TIA!
Louie C.
How will you be able to check which field is causing the error when the error comes up generally when trying to save/submit a web form though?
Louie C.
Thanks to both of you guys and sorry for the late reply.
I'm gonna look at this getopts builtin and let you know if I'm successful.
Thanks again for pointing me in the right direction! Louie C.
Thanks for the reply guys. However, I found predamarcel's to be most helpful.
I'd like to follow up predamarcel on a few things.
How does the caret work generally? I understood the reverse matching on grep but not the caret (^). And what's the -1 at the end of the command for?
Hope you don't...
Hi,
is this the correct and most concise syntax to match an argument to just two items?
if [ "$1" == "-[dD]" ]; then
ACTION
fi
I want a more concise version to the one below that's why i'm asking.
if [ "$1" == "-d" -o "$1" ==...
How do I use ls to exclude subdirectories, the . and .. but include all other files? I'll then just wc -w to get the total count of files?
TIA,
Louie C.
Hi,
I configured /etc/snmp/snmpd.conf recently substituting our own community string for "public" and it seems to be working fine but when i try to snmpwalk from localhost it just says the connection timed out. I flushed my iptables thinking it's causing the timeout but to no avail...
Guys,
Please help! I edited .dtprofile and .profile of root and there are yet no other users on my Solaris 2.6. I rebooted and now root can't login; the error message read: no shell or something.
How do I bypass this so I can log back in and edit the necessary files? Is there a single user...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.