Showing posts with label msdn. Show all posts
Showing posts with label msdn. Show all posts

Monday, March 19, 2012

Did I just trip over a golden egg?

I'v been scouring the MSDN library and asking in newsgroups, forums, etc. on a way to extract [only] the time from a DateTime field (for a stored procedure) and no one could answer my question. then I tried this in QA:

selectright(getdate(),7)

and I found an answer. I'm now looking for someone to prove this is either a golden egg, a goose egg, or a documented feature I missed and if so where, so I can learn from it.

Jon

This will work,if you know what the default locale of the Sql Server is set as. However, if you don't, then you could get a nasty shock. For instance, if the server happened to be using ISO8601 dateformats then you would get something meaningless back.

Try

SELECT Right(CONVERT(varchar,GetDate(),126),7)

to see what I mean. The safest way to do what you are doing would be:

SELECT LTRIM(Right(CONVERT(varchar,GetDate(),0),7))

That should guarantee you are getting the correct dateformat string to work with. There's nothing mysterious about the RIGHT function, either - most SQL languages have a substring function.|||

Thank you and I accept the safest way as you suggested. The RIGHT function wasn't mysterious to me but rather the tool I used to get the answer I wanted. I was looking for an easy means to retrieve the time from SQL and was frustrated nobody out there could answer a question I thought would be a standard novice question. I'm realizing the simplest things are the cause of the greatest frustration in the programming world. Thanks for your solution.

Jon

|||Actually, I would suggest this:
SELECT CONVERT(char(12),GETDATE(),114)

For this datetime value:
2005-12-17 20:55:27.060

This would be returned:
20:55:27:060

SeeCAST and CONVERT for more information on how to use these 2 functions.|||

Thank You Terri! I was not familiar with CONVERT and now it seems ALL my date problems can be solved by this new information.

Jon

|||

Hmmm... that's interesting. To tell you the truth, I would have just used a whole bunch of datepart functions myself :)

Friday, February 24, 2012

Developer Edition of SQL 2005

Can someone clarify what is the Developer Edition of SQL 2005 (MSDN) - I
went to MS SQL site and I do not see a Developer Edition -
http://www.microsoft.com/sql/2005/pr...5features.mspx
Okay, I just saw a post that basically says its equivalent to Enterprise.
Then what's the real difference - it is just a license restriction? Will
the Actual standard and Enterprise 2003 be available for download on MSDN?
"MM" <mm@.mailme.com> wrote in message
news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl...
> Can someone clarify what is the Developer Edition of SQL 2005 (MSDN) - I
> went to MS SQL site and I do not see a Developer Edition -
> http://www.microsoft.com/sql/2005/pr...5features.mspx
>
>
|||Yeah, the only real difference between Developer Edition & Enterprise
Edition is how it is licensed
<http://www.microsoft.com/sql/howtobuy/development.mspx>. Standard
Edition & Enterprise Edition are both available in MSDN Subscribers
downloads (I don't think they're available for download on the public
part of MSDN) and, of course, the eval edition
<http://www.microsoft.com/sql/evaluat...l/default.mspx> (120-day
time-bombed) is available on the public Microsoft SQL Server website.
That's all SQL 2000. In your post you mention Enterprise 2003. Do you
mean SQL Server 2000 Enterprise Edition
<http://www.microsoft.com/sql/evaluat.../choosing.mspx> or SQL
Server 2005 Enterprise Edition
<http://www.microsoft.com/sql/2005/pr...5features.mspx> or
are you talking about Windows Server 2003 Enterprise
<http://www.microsoft.com/windowsserv...eeditions.mspx>?
*mike hodgson*
blog: http://sqlnerd.blogspot.com
MM wrote:

>Okay, I just saw a post that basically says its equivalent to Enterprise.
>Then what's the real difference - it is just a license restriction? Will
>the Actual standard and Enterprise 2003 be available for download on MSDN?
>
>"MM" <mm@.mailme.com> wrote in message
>news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl...
>
>
>
|||MM wrote:
> Okay, I just saw a post that basically says its equivalent to Enterprise.
> Then what's the real difference - it is just a license restriction? Will
> the Actual standard and Enterprise 2003 be available for download on MSDN?
>
> "MM" <mm@.mailme.com> wrote in message
> news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl...
>
>
developer edition is always the same (sql 7, sql 2000) as eneterprise.
Only difference is license!
You'll probably get to download evaluation edition, which is , again,
the same as enterprise edition but with 120 days evaluation period
|||No difference? Have you tried to install enterprise edition on Windows 2000
pros or XP pro?
"MM" wrote:

> Okay, I just saw a post that basically says its equivalent to Enterprise.
> Then what's the real difference - it is just a license restriction? Will
> the Actual standard and Enterprise 2003 be available for download on MSDN?
>
> "MM" <mm@.mailme.com> wrote in message
> news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl...
>
>

Developer Edition of SQL 2005

Can someone clarify what is the Developer Edition of SQL 2005 (MSDN) - I
went to MS SQL site and I do not see a Developer Edition -
http://www.microsoft.com/sql/2005/productinfo/sql2005features.mspxOkay, I just saw a post that basically says its equivalent to Enterprise.
Then what's the real difference - it is just a license restriction? Will
the Actual standard and Enterprise 2003 be available for download on MSDN?
"MM" <mm@.mailme.com> wrote in message
news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl...
> Can someone clarify what is the Developer Edition of SQL 2005 (MSDN) - I
> went to MS SQL site and I do not see a Developer Edition -
> http://www.microsoft.com/sql/2005/productinfo/sql2005features.mspx
>
>|||This is a multi-part message in MIME format.
--070200070908020003050409
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Yeah, the only real difference between Developer Edition & Enterprise
Edition is how it is licensed
<http://www.microsoft.com/sql/howtobuy/development.mspx>. Standard
Edition & Enterprise Edition are both available in MSDN Subscribers
downloads (I don't think they're available for download on the public
part of MSDN) and, of course, the eval edition
<http://www.microsoft.com/sql/evaluation/trial/default.mspx> (120-day
time-bombed) is available on the public Microsoft SQL Server website.
That's all SQL 2000. In your post you mention Enterprise 2003. Do you
mean SQL Server 2000 Enterprise Edition
<http://www.microsoft.com/sql/evaluation/features/choosing.mspx> or SQL
Server 2005 Enterprise Edition
<http://www.microsoft.com/sql/2005/productinfo/sql2005features.mspx> or
are you talking about Windows Server 2003 Enterprise
<http://www.microsoft.com/windowsserver2003/evaluation/features/compareeditions.mspx>?
--
*mike hodgson*
blog: http://sqlnerd.blogspot.com
MM wrote:
>Okay, I just saw a post that basically says its equivalent to Enterprise.
>Then what's the real difference - it is just a license restriction? Will
>the Actual standard and Enterprise 2003 be available for download on MSDN?
>
>"MM" <mm@.mailme.com> wrote in message
>news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl...
>
>>Can someone clarify what is the Developer Edition of SQL 2005 (MSDN) - I
>>went to MS SQL site and I do not see a Developer Edition -
>>http://www.microsoft.com/sql/2005/productinfo/sql2005features.mspx
>>
>>
>
>
--070200070908020003050409
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Yeah, the only real difference between Developer Edition &
Enterprise Edition is how it is <a
href="http://links.10026.com/?link=licensed</a>. ">http://www.microsoft.com/sql/howtobuy/development.mspx">licensed</a>.
Standard Edition & Enterprise Edition are both available in MSDN
Subscribers downloads (I don't think they're available for download on
the public part of MSDN) and, of course, the <a
href="http://links.10026.com/?link=eval">http://www.microsoft.com/sql/evaluation/trial/default.mspx">eval
edition</a> (120-day time-bombed) is available on the public Microsoft
SQL Server website.<br>
<br>
That's all SQL 2000. In your post you mention Enterprise 2003. Do you
mean <a
href="http://links.10026.com/?link=SQL">http://www.microsoft.com/sql/evaluation/features/choosing.mspx">SQL
Server 2000 Enterprise Edition</a> or <a
href="http://links.10026.com/?link=SQL">http://www.microsoft.com/sql/2005/productinfo/sql2005features.mspx">SQL
Server 2005 Enterprise Edition</a> or are you talking about <a
href="http://links.10026.com/?link=Windows">http://www.microsoft.com/windowsserver2003/evaluation/features/compareeditions.mspx">Windows
Server 2003 Enterprise</a>?<br>
</tt>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<font face="Tahoma" size="2">blog:</font><font face="Tahoma" size="2"> <a
href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
</p>
</div>
<br>
<br>
MM wrote:
<blockquote cite="miduSkNVM32FHA.1276@.TK2MSFTNGP09.phx.gbl" type="cite">
<pre wrap="">Okay, I just saw a post that basically says its equivalent to Enterprise.
Then what's the real difference - it is just a license restriction? Will
the Actual standard and Enterprise 2003 be available for download on MSDN?
"MM" <a class="moz-txt-link-rfc2396E" href="http://links.10026.com/?link=mailto:mm@.mailme.com"><mm@.mailme.com></a> wrote in message
<a class="moz-txt-link-freetext" href="http://links.10026.com/?link=news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl">news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Can someone clarify what is the Developer Edition of SQL 2005 (MSDN) - I
went to MS SQL site and I do not see a Developer Edition -
<a class="moz-txt-link-freetext" href="http://links.10026.com/?link=http://www.microsoft.com/sql/2005/productinfo/sql2005features.mspx</a>">http://www.microsoft.com/sql/2005/productinfo/sql2005features.mspx">http://www.microsoft.com/sql/2005/productinfo/sql2005features.mspx</a>
</pre>
</blockquote>
<pre wrap=""><!-->
</pre>
</blockquote>
</body>
</html>
--070200070908020003050409--|||MM wrote:
> Okay, I just saw a post that basically says its equivalent to Enterprise.
> Then what's the real difference - it is just a license restriction? Will
> the Actual standard and Enterprise 2003 be available for download on MSDN?
>
> "MM" <mm@.mailme.com> wrote in message
> news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl...
>>Can someone clarify what is the Developer Edition of SQL 2005 (MSDN) - I
>>went to MS SQL site and I do not see a Developer Edition -
>>http://www.microsoft.com/sql/2005/productinfo/sql2005features.mspx
>>
>
>
developer edition is always the same (sql 7, sql 2000) as eneterprise.
Only difference is license!
You'll probably get to download evaluation edition, which is , again,
the same as enterprise edition but with 120 days evaluation period|||No difference? Have you tried to install enterprise edition on Windows 2000
pros or XP pro?
"MM" wrote:
> Okay, I just saw a post that basically says its equivalent to Enterprise.
> Then what's the real difference - it is just a license restriction? Will
> the Actual standard and Enterprise 2003 be available for download on MSDN?
>
> "MM" <mm@.mailme.com> wrote in message
> news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl...
> > Can someone clarify what is the Developer Edition of SQL 2005 (MSDN) - I
> > went to MS SQL site and I do not see a Developer Edition -
> > http://www.microsoft.com/sql/2005/productinfo/sql2005features.mspx
> >
> >
> >
>
>

Developer Edition of SQL 2005

Can someone clarify what is the Developer Edition of SQL 2005 (MSDN) - I
went to MS SQL site and I do not see a Developer Edition -
http://www.microsoft.com/sql/2005/p...05features.mspxOkay, I just saw a post that basically says its equivalent to Enterprise.
Then what's the real difference - it is just a license restriction? Will
the Actual standard and Enterprise 2003 be available for download on MSDN?
"MM" <mm@.mailme.com> wrote in message
news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl...
> Can someone clarify what is the Developer Edition of SQL 2005 (MSDN) - I
> went to MS SQL site and I do not see a Developer Edition -
> http://www.microsoft.com/sql/2005/p...05features.mspx
>
>|||Yeah, the only real difference between Developer Edition & Enterprise
Edition is how it is licensed
<http://www.microsoft.com/sql/howtobuy/development.mspx>. Standard
Edition & Enterprise Edition are both available in MSDN Subscribers
downloads (I don't think they're available for download on the public
part of MSDN) and, of course, the eval edition
<http://www.microsoft.com/sql/evalua...al/default.mspx> (120-day
time-bombed) is available on the public Microsoft SQL Server website.
That's all SQL 2000. In your post you mention Enterprise 2003. Do you
mean SQL Server 2000 Enterprise Edition
<http://www.microsoft.com/sql/evalua...s/choosing.mspx> or SQL
Server 2005 Enterprise Edition
<http://www.microsoft.com/sql/2005/p...05features.mspx> or
are you talking about Windows Server 2003 Enterprise
<http://www.microsoft.com/windowsser...ns.ms
px>?
*mike hodgson*
blog: http://sqlnerd.blogspot.com
MM wrote:

>Okay, I just saw a post that basically says its equivalent to Enterprise.
>Then what's the real difference - it is just a license restriction? Will
>the Actual standard and Enterprise 2003 be available for download on MSDN?
>
>"MM" <mm@.mailme.com> wrote in message
>news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl...
>
>
>|||MM wrote:
> Okay, I just saw a post that basically says its equivalent to Enterprise.
> Then what's the real difference - it is just a license restriction? Will
> the Actual standard and Enterprise 2003 be available for download on MSDN?
>
> "MM" <mm@.mailme.com> wrote in message
> news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl...
>
>
>
developer edition is always the same (sql 7, sql 2000) as eneterprise.
Only difference is license!
You'll probably get to download evaluation edition, which is , again,
the same as enterprise edition but with 120 days evaluation period|||No difference? Have you tried to install enterprise edition on Windows 2000
pros or XP pro?
"MM" wrote:

> Okay, I just saw a post that basically says its equivalent to Enterprise.
> Then what's the real difference - it is just a license restriction? Will
> the Actual standard and Enterprise 2003 be available for download on MSDN?
>
> "MM" <mm@.mailme.com> wrote in message
> news:OEO4pJ32FHA.3272@.TK2MSFTNGP09.phx.gbl...
>
>