www.sql-server-helper.com Open in urlscan Pro
50.63.8.169  Public Scan

URL: http://www.sql-server-helper.com/
Submission: On November 13 via manual from UA — Scanned from DE

Form analysis 1 forms found in the DOM

Name: aspnetFormPOST ./

<form name="aspnetForm" method="post" action="./" id="aspnetForm" style="height: auto !important;">
  <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
    value="/wEPDwUKLTg0MzE3OTMyNA9kFgJmD2QWAgIDD2QWBAIRDw8WBB4LTmF2aWdhdGVVcmwFlAF+L3RpcHMvdGlwLW9mLXRoZS1kYXkuYXNweD90a2V5PWEyM2YxMmFjLTI0NWEtNDBkNS04Y2I1LTFmNDZlMjY5MTA3ZiZ0a3c9c2ltaWxhcml0aWVzLWFuZC1kaWZmZXJlbmNlcy1iZXR3ZWVuLWdldGRhdGUtYW5kLXN5c2RhdGV0aW1lLWRhdGUtZnVuY3Rpb25zHgRUZXh0BUtTaW1pbGFyaXRpZXMgYW5kIERpZmZlcmVuY2VzIEJldHdlZW4gR0VUREFURSBhbmQgU1lTREFURVRJTUUgRGF0ZSBGdW5jdGlvbnNkZAITD2QWCAIBDw8WAh8BBRFOb3ZlbWJlciAxMywgMjAyM2RkAgMPDxYCHwEFS1NpbWlsYXJpdGllcyBhbmQgRGlmZmVyZW5jZXMgQmV0d2VlbiBHRVREQVRFIGFuZCBTWVNEQVRFVElNRSBEYXRlIEZ1bmN0aW9uc2RkAgUPDxYCHwEF9CU8cD5QcmlvciB0byBTUUwgU2VydmVyIDIwMDgsIHRoZXJlIHdlcmUgb25seSB0aHJlZSBmdW5jdGlvbnMgdGhhdCByZXR1cm4gdGhlIGN1cnJlbnQgc3lzdGVtIGRhdGUgYW5kIHRpbWUgb2YgdGhlIGNvbXB1dGVyIG9uIHdoaWNoIHRoZSBpbnN0YW5jZSBvZiBTUUwgU2VydmVyIGlzIHJ1bm5pbmcsIG5hbWVseSA8c3Ryb25nPkNVUlJFTlRfVElNRVNUQU1QPC9zdHJvbmc+LCA8c3Ryb25nPkdF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JhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50OyB3aWR0aDogMjIxLjE1cHQ7IGJvcmRlci1yaWdodC13aWR0aDogMXB0OyBib3JkZXItcmlnaHQtc3R5bGU6IHNvbGlkOyI+DQogICAgICAgICAgICA8cD5BdmFpbGFibGUgZnJvbSBTUUwgU2VydmVyIDIwMDAgYW5kIG9ud2FyZHMuPC9wPg0KICAgICAgICAgICAgPC90ZD4NCiAgICAgICAgICAgIDx0ZCB2YWxpZ249InRvcCIgc3R5bGU9ImJvcmRlci1jb2xvcjogI2YwZjBmMCBibGFjayBibGFjayAjZjBmMGYwOyBib3JkZXItYm90dG9tLXdpZHRoOiAxcHQ7IGJvcmRlci1ib3R0b20tc3R5bGU6IHNvbGlkOyBwYWRkaW5nOiAwaW4gNS40cHQ7IGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50OyB3aWR0aDogMjIxLjJwdDsgYm9yZGVyLXJpZ2h0LXdpZHRoOiAxcHQ7IGJvcmRlci1yaWdodC1zdHlsZTogc29saWQ7Ij4NCiAgICAgICAgICAgIDxwPkF2YWlsYWJsZSBvbmx5IGZyb20gU1FMIFNlcnZlciAyMDA4IGFuZCBvbndhcmRzLjwvcD4NCiAgICAgICAgICAgIDwvdGQ+DQogICAgICAgIDwvdHI+DQogICAgPC90Ym9keT4NCjwvdGFibGU+ZGQCBw8PFgIfAAWSAXRpcHMvdGlwLW9mLXRoZS1kYXkuYXNweD90a2V5PWEyM2YxMmFjLTI0NWEtNDBkNS04Y2I1LTFmNDZlMjY5MTA3ZiZ0a3c9c2ltaWxhcml0aWVzLWFuZC1kaWZmZXJlbmNlcy1iZXR3ZWVuLWdldGRhdGUtYW5kLXN5c2RhdGV0aW1lLWRhdGUtZnVuY3Rpb25zZGRk8jze6U8aEkvgWCGT83eHnH7Aex6uvLKyngq9Zgx9wFQ=">
  <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="CA0B0334">
  <header role="banner">
    <div><a id="_ctl0_HyperLinkLogo" href="default.aspx"><img src="images/sshlogo_blue2.bmp" alt="" border="0"></a></div>
    <nav>
      <ul id="topnavigation" class="topnav">
        <li><a id="_ctl0_HyperLinkHome" href="default.aspx">Home</a></li>
        <li><a id="_ctl0_HyperLinkArticles" href="articles/index.aspx">Articles</a></li>
        <li><a id="_ctl0_HyperLinkSQLServer2012" href="sql-server-2012/index.aspx">SQL Server 2012</a></li>
        <li><a id="_ctl0_HyperLinkSQLServer2014" href="sql-server-2014/index.aspx">SQL Server 2014</a></li>
        <li><a id="_ctl0_HyperLinkSQLServer2016" href="sql-server-2016/index.aspx">SQL Server 2016</a></li>
        <li><a id="_ctl0_HyperLinkFAQ" href="faq/index.aspx">FAQ</a></li>
        <li><a id="_ctl0_HyperLinkPracticeTest" href="free-test/default.aspx">Practice Test</a></li>
      </ul>
    </nav>
  </header>
  <section>
    <div>
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tbody>
          <tr valign="middle">
            <td style="text-align: left">
              <b style="color: red">Tip of the Day : </b>
              <a id="_ctl0_HyperLinkTipOfTheDay" class="link1" href="tips/tip-of-the-day.aspx?tkey=a23f12ac-245a-40d5-8cb5-1f46e269107f&amp;tkw=similarities-and-differences-between-getdate-and-sysdatetime-date-functions">Similarities and Differences Between GETDATE and SYSDATETIME Date Functions</a>
            </td>
            <td style="text-align: right; margin-top: 0px; padding-top: 0px" valign="top" width="350px">
              <iframe frameborder="0" scrolling="no" style="height: 26px; margin-top: 0px; padding-top: 0px" src="/Search.htm">
              </iframe>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </section>
  <div style="display: inline-block; position: relative; height: auto !important;">
    <section style="height: auto !important;">
      <div class="content" style="height: auto !important;">
        <article>
          <header>
            <h1 class="header">Welcome to SQL Server Helper !!!</h1>
          </header>
          <div>
            <p>This site is intended for those who are beginning to use SQL Server as part of their day-to-day activities.&nbsp; You will find in this site a collection of useful functions, triggers, stored procedures and tips and tricks related to
              SQL Server.</p>
            <p>Should you have any comments or questions regarding this site or if you want to ask SQL Server-related questions, e-mail us <a href="#" onmouseover="setAnchorMailTo(this, &quot;comments&quot;)">here</a>.</p>
            <p>We hope we are able to help and we are glad to help!!!</p>
          </div>
        </article>
        <article>
          <script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
          <!-- Home Page, Index, Header Responsive -->
          <ins class="adsbygoogle" style="display: block; height: 280px;" data-ad-client="ca-pub-3546235688736299" data-ad-slot="5784551998" data-ad-format="auto" data-adsbygoogle-status="done" data-ad-status="filled">
            <div id="aswift_1_host" tabindex="0" title="Advertisement" aria-label="Advertisement"
              style="border: none; height: 280px; width: 1118px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;"><iframe id="aswift_1" name="aswift_1"
                style="left:0;position:absolute;top:0;border:0;width:1118px;height:280px;" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" width="1118"
                height="280" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no"
                src="https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-3546235688736299&amp;output=html&amp;h=280&amp;slotname=5784551998&amp;adk=3301576339&amp;adf=3048710276&amp;pi=t.ma~as.5784551998&amp;w=1118&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1699876099&amp;rafmt=1&amp;format=1118x280&amp;url=http%3A%2F%2Fwww.sql-server-helper.com%2F&amp;ea=0&amp;fwr=0&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;dt=1699876099200&amp;bpp=2&amp;bdt=623&amp;idt=228&amp;shv=r20231108&amp;mjsv=m202311020101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;prev_fmts=0x0&amp;nras=1&amp;correlator=960390549833&amp;frm=20&amp;pv=1&amp;ga_vid=1314745930.1699876099&amp;ga_sid=1699876099&amp;ga_hid=1649155159&amp;ga_fc=1&amp;u_tz=60&amp;u_his=2&amp;u_h=1200&amp;u_w=1600&amp;u_ah=1200&amp;u_aw=1600&amp;u_cd=24&amp;u_sd=1&amp;adx=241&amp;ady=405&amp;biw=1600&amp;bih=1200&amp;scr_x=0&amp;scr_y=0&amp;eid=44759876%2C44759927%2C31079406%2C44807461%2C31078297%2C44807763%2C44808148&amp;oid=2&amp;pvsid=2546241506741222&amp;tmod=1044278083&amp;uas=0&amp;nvt=1&amp;fc=1920&amp;brdim=0%2C0%2C0%2C0%2C1600%2C0%2C1600%2C1200%2C1600%2C1200&amp;vis=1&amp;rsz=%7C%7CeE%7C&amp;abl=CS&amp;pfx=0&amp;fu=128&amp;bc=23&amp;psd=W251bGwsbnVsbCxudWxsLDNd&amp;ifi=2&amp;uci=a!2&amp;fsb=1&amp;dtd=234"
                data-google-container-id="a!2" data-google-query-id="CMePyvjzwIIDFSRPkQUdYPAMZA" data-load-complete="true"></iframe></div>
          </ins>
          <script>
            (adsbygoogle = window.adsbygoogle || []).push({});
          </script>
        </article>
        <article>
          <header>
            <h1 class="header">SQL Server Tip of the Day - <span id="_ctl0_ContentPlaceHolder1_LabelTodaysDate">November 13, 2023</span></h1>
          </header>
          <div>
            <h3><span id="_ctl0_ContentPlaceHolder1_LabelTipOfTheDayTitle">Similarities and Differences Between GETDATE and SYSDATETIME Date Functions</span></h3>
            <div><span id="_ctl0_ContentPlaceHolder1_LabelTipOfTheDay">
                <p>Prior to SQL Server 2008, there were only three functions that return the current system date and time of the computer on which the instance of SQL Server is running, namely <strong>CURRENT_TIMESTAMP</strong>, <strong>GETDATE
                  </strong>and <strong>GETUTCDATE</strong>. &nbsp;Beginning with SQLS erver 2008, three other date functions were introduced namely <strong>SYSDATETIME</strong>, <strong>SYSDATETIMEOFFSET </strong>and <strong>SYSUTCDATETIME</strong>.
                </p>
                <p>The following article shows the similarities between the <strong>GETDATE()</strong> date function and the <strong>SYSDATETIME()</strong> date function.</p>
                <p class="topicSubTitle">Similarities</p>
                <ul>
                  <li>Returns the current date and time of the computer on which the instance of SQL Server is running.</li>
                  <li>The time zone offset is not included on both functions.</li>
                  <li>Both functions do not accept a parameter.</li>
                  <li>Both functions are nondeterministic functions. Views and expressions that reference these functions in a column cannot be indexed.</li>
                </ul>
                <p class="topicSubTitle">Differences</p>
                <table width="100%" border="1" cellspacing="0" cellpadding="0">
                  <tbody>
                    <tr>
                      <td valign="top" style="padding: 0in 5.4pt; background-color: transparent; width: 221.15pt; border: 1pt solid black;">
                        <p style="text-align: center;"><strong>GETDATE()</strong></p>
                      </td>
                      <td valign="top"
                        style="border-color: black black black #f0f0f0; border-bottom-width: 1pt; border-bottom-style: solid; padding: 0in 5.4pt; background-color: transparent; width: 221.2pt; border-top-width: 1pt; border-top-style: solid; border-right-width: 1pt; border-right-style: solid;">
                        <p style="text-align: center;"><strong>SYSDATETIME()</strong></p>
                      </td>
                    </tr>
                    <tr>
                      <td valign="top"
                        style="border-color: #f0f0f0 black black; border-bottom-width: 1pt; border-bottom-style: solid; border-left-width: 1pt; border-left-style: solid; padding: 0in 5.4pt; background-color: transparent; width: 221.15pt; border-right-width: 1pt; border-right-style: solid;">
                        <p>Returns a DATETIME value</p>
                      </td>
                      <td valign="top"
                        style="border-color: #f0f0f0 black black #f0f0f0; border-bottom-width: 1pt; border-bottom-style: solid; padding: 0in 5.4pt; background-color: transparent; width: 221.2pt; border-right-width: 1pt; border-right-style: solid;">
                        <p>Returns a DATETIME2(7) value</p>
                      </td>
                    </tr>
                    <tr>
                      <td valign="top"
                        style="border-color: #f0f0f0 black black; border-bottom-width: 1pt; border-bottom-style: solid; border-left-width: 1pt; border-left-style: solid; padding: 0in 5.4pt; background-color: transparent; width: 221.15pt; border-right-width: 1pt; border-right-style: solid;">
                        <p>Returns less fractional seconds precision, only 3 decimal places.</p>
                      </td>
                      <td valign="top"
                        style="border-color: #f0f0f0 black black #f0f0f0; border-bottom-width: 1pt; border-bottom-style: solid; padding: 0in 5.4pt; background-color: transparent; width: 221.2pt; border-right-width: 1pt; border-right-style: solid;">
                        <p>Returns more fractional seconds precision, up to 7 decimal places.</p>
                      </td>
                    </tr>
                    <tr>
                      <td valign="top"
                        style="border-color: #f0f0f0 black black; border-bottom-width: 1pt; border-bottom-style: solid; border-left-width: 1pt; border-left-style: solid; padding: 0in 5.4pt; background-color: transparent; width: 221.15pt; border-right-width: 1pt; border-right-style: solid;">
                        <p>Accuracy is up to 0.00333 seconds.</p>
                      </td>
                      <td valign="top"
                        style="border-color: #f0f0f0 black black #f0f0f0; border-bottom-width: 1pt; border-bottom-style: solid; padding: 0in 5.4pt; background-color: transparent; width: 221.2pt; border-right-width: 1pt; border-right-style: solid;">
                        <p>Accuracy is up to 100 nanoseconds.</p>
                      </td>
                    </tr>
                    <tr>
                      <td valign="top"
                        style="border-color: #f0f0f0 black black; border-bottom-width: 1pt; border-bottom-style: solid; border-left-width: 1pt; border-left-style: solid; padding: 0in 5.4pt; background-color: transparent; width: 221.15pt; border-right-width: 1pt; border-right-style: solid;">
                        <p>Available from SQL Server 2000 and onwards.</p>
                      </td>
                      <td valign="top"
                        style="border-color: #f0f0f0 black black #f0f0f0; border-bottom-width: 1pt; border-bottom-style: solid; padding: 0in 5.4pt; background-color: transparent; width: 221.2pt; border-right-width: 1pt; border-right-style: solid;">
                        <p>Available only from SQL Server 2008 and onwards.</p>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </span></div>
            <div style="text-align: right">
              <a id="_ctl0_ContentPlaceHolder1_HyperLinkTipOfTheDay" href="tips/tip-of-the-day.aspx?tkey=a23f12ac-245a-40d5-8cb5-1f46e269107f&amp;tkw=similarities-and-differences-between-getdate-and-sysdatetime-date-functions">More Tips</a></div>
          </div>
        </article>
        <article>
          <header>
            <h1 class="header"><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012" class="header" href="sql-server-2012/index.aspx">SQL Server 2012</a></h1>
          </header>
          <div>
            <h3><a id="_ctl0_ContentPlaceHolder1_HyperLink2" href="sql-server-2012/index.aspx#WhatsNew">What's New in SQL Server 2012</a></h3>
            <ul>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkWhatsNewInSQLServer2012" href="sql-server-2012/whats-new-in-sql-server-2012.aspx">What's New in SQL Server 2012</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012_1" href="sql-server-2012/faq-editions-and-licensing.aspx">SQL Server 2012 Editions and Licensing - Frequently Asked Questions</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012_2" class="link2" href="sql-server-2012/sql-server-2012-programmability-datasheet.aspx">SQL Server 2012 Programmability Datasheet</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012_3" class="link2" href="sql-server-2012/sql-server-2012-analysis-services-datasheet.aspx">SQL Server 2012 Analysis Services Datasheet</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012_4" class="link2" href="sql-server-2012/sql-server-2012-master-data-services-datasheet.aspx">SQL Server 2012 Master Data Services Datasheet</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012_5" class="link2" href="sql-server-2012/sql-server-2012-data-mining-datasheet.aspx">SQL Server 2012 Data Mining Datasheet</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012_6" class="link2" href="sql-server-2012/sql-server-2012-high-availability.aspx">SQL Server 2012 High Availability Datasheet</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012_7" class="link2" href="sql-server-2012/sql-server-2012-maximum-capacity-specifications.aspx">SQL Server 2012 Maximum Capacity Specifications</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012_8" class="link2" href="sql-server-2012/sql-server-2012-server-configuration-options.aspx">SQL Server 2012 Server Configuration Options</a></li>
            </ul>
            <h3><a id="_ctl0_ContentPlaceHolder1_HyperLink3" href="sql-server-2012/index.aspx#SQLServer2012Articles">SQL Server 2012 Articles</a></h3>
            <ul>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012NewDateFunctions" href="sql-server-2012/sql-server-2012-new-date-functions.aspx">SQL Server 2012 New Date Functions</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012NewStringFunctions" class="link2" href="sql-server-2012/sql-server-2012-new-string-functions.aspx">SQL Server 2012 New String Functions</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012NewLogicalFunctions" class="link2" href="sql-server-2012/sql-server-2012-new-iif-choose-logical-functions.aspx">SQL Server 2012 New Logical Functions (CHOOSE and IIF)</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012FormatStringFunctionCulture" class="link2" href="sql-server-2012/format-string-function-culture.aspx">SQL Server 2012 FORMAT String Function Culture</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2012FormatVsConvert" class="link2" href="sql-server-2012/format-function-vs-convert-function.aspx">SQL Server 2012 Date Formats Using the FORMAT Function and CONVERT Function</a>
              </li>
            </ul>
          </div>
        </article>
        <article>
          <header>
            <h1 class="header"><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2008" class="header" href="sql-server-2008/index.aspx">SQL Server 2008</a></h1>
          </header>
          <div>
            <h3><a id="_ctl0_ContentPlaceHolder1_HyperLinkWhatsNewInSQLServer2008" href="sql-server-2008/index.aspx#WhatsNew">What's New in SQL Server 2008</a></h3>
            <p>A collection of articles related to what's new with SQL Server 2008:</p>
            <ul>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkCompoundOperators" href="sql-server-2008/compound-operators.aspx">Compound Operators</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkMultipleValueInserts" href="sql-server-2008/multiple-value-inserts.aspx">Multiple Value Inserts Within a Single INSERT Statement</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkRowConstructorAsDerivedTable" href="sql-server-2008/row-value-constructor-as-derived-table.aspx">Row Constructor (or Table-Valued Constructor) as Derived Table</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkMergeStatement" href="sql-server-2008/merge-statement.aspx">MERGE Statement</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkTableValuedParameters" href="sql-server-2008/table-valued-parameters.aspx">Table-Valued Parameters</a></li>
            </ul>
            <h3><a id="_ctl0_ContentPlaceHolder1_HyperLinkSQLServer2008Articles" href="sql-server-2008/index.aspx#SQLServer2008Articles">SQL Server 2008 Articles</a></h3>
            <p>A collection of articles related to SQL Server 2008:</p>
            <ul>
              <li>
                <a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorImportGeographyGeometry" href="sql-server-2008/import-export-unknown-column-type-geography-geometry.aspx">Error in Importing/Exporting Geography/Geometry Columns in SQL Server 2008 Management Studio</a>
              </li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkConnectionError1326" href="sql-server-2008/connection-error-1326.aspx">SQL Server 2008 to Windows Server 2008 Connection Error 1326</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkStoreLocatorUsingGeographyDataType" href="sql-server-2008/store-locator-using-geography-data-type.aspx">Store Locator Using Geography Data Type</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkConvertLatLongToGeographyPoint" href="sql-server-2008/convert-latitude-longitude-to-geography-point.aspx">Convert Latitude/Longitude (Lat/Long) to Geography Point</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkMergeStatementWithTableValuedParameters" href="sql-server-2008/merge-statement-with-table-valued-parameters.aspx">MERGE Statement With Table-Valued Parameters</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSqlConnectionConnectionString" href="sql-server-2008/sqlconnection-connection-string.aspx">SqlConnection Connection String</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkSqlServer2008DateFormats" href="sql-server-2008/sql-server-2008-date-format.aspx">SQL Server 2008 Date Formats</a></li>
            </ul>
          </div>
        </article>
        <article>
          <script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
          <!-- Home Page, Index, Middle Responsive -->
          <ins class="adsbygoogle" style="display: block; height: 280px;" data-ad-client="ca-pub-3546235688736299" data-ad-slot="8738018394" data-ad-format="auto" data-adsbygoogle-status="done" data-ad-status="filled">
            <div id="aswift_2_host" tabindex="0" title="Advertisement" aria-label="Advertisement"
              style="border: none; height: 280px; width: 1118px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;"><iframe id="aswift_2" name="aswift_2"
                style="left:0;position:absolute;top:0;border:0;width:1118px;height:280px;" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" width="1118"
                height="280" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no"
                src="https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-3546235688736299&amp;output=html&amp;h=280&amp;slotname=8738018394&amp;adk=3270840833&amp;adf=658521764&amp;pi=t.ma~as.8738018394&amp;w=1118&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1699876099&amp;rafmt=1&amp;format=1118x280&amp;url=http%3A%2F%2Fwww.sql-server-helper.com%2F&amp;ea=0&amp;fwr=0&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;dt=1699876099202&amp;bpp=1&amp;bdt=625&amp;idt=241&amp;shv=r20231108&amp;mjsv=m202311020101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;prev_fmts=0x0%2C1118x280&amp;nras=1&amp;correlator=960390549833&amp;frm=20&amp;pv=1&amp;ga_vid=1314745930.1699876099&amp;ga_sid=1699876099&amp;ga_hid=1649155159&amp;ga_fc=1&amp;u_tz=60&amp;u_his=2&amp;u_h=1200&amp;u_w=1600&amp;u_ah=1200&amp;u_aw=1600&amp;u_cd=24&amp;u_sd=1&amp;adx=241&amp;ady=2360&amp;biw=1600&amp;bih=1200&amp;scr_x=0&amp;scr_y=0&amp;eid=44759876%2C44759927%2C31079406%2C44807461%2C31078297%2C44807763%2C44808148&amp;oid=2&amp;pvsid=2546241506741222&amp;tmod=1044278083&amp;uas=0&amp;nvt=1&amp;fc=1920&amp;brdim=0%2C0%2C0%2C0%2C1600%2C0%2C1600%2C1200%2C1600%2C1200&amp;vis=1&amp;rsz=%7C%7CeEbr%7C&amp;abl=CS&amp;pfx=0&amp;fu=128&amp;bc=23&amp;psd=W251bGwsbnVsbCxudWxsLDNd&amp;ifi=3&amp;uci=a!3&amp;btvi=1&amp;fsb=1&amp;dtd=252"
                data-google-container-id="a!3" data-google-query-id="CLH6yvjzwIIDFf1QkQUdvrQLdg" data-load-complete="true"></iframe></div>
          </ins>
          <script>
            (adsbygoogle = window.adsbygoogle || []).push({});
          </script>
        </article>
        <article>
          <header>
            <h1 class="header"><a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctions" class="header" href="functions/index.aspx">User-Defined Functions</a></h1>
          </header>
          <div>
            <h3><a id="_ctl0_ContentPlaceHolder1_HyperLinkDateFunctions" href="functions/index.aspx#DateFunctions">Date Functions</a></h3>
            <p>A collection of useful user-defined functions that deal with dates.</p>
            <ul>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsDate1" href="functions/get-age.aspx">Determine the age of a person as of today given the birthdate.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsDate2" href="functions/is-leap-year.aspx">Determine if it is a leap year.</a></li>
              <li>Get the <a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsDate3" href="functions/get-first-day-of-week.aspx">first day of the week</a>,
                <a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsDate4" href="functions/get-first-day-of-month.aspx">first day of the month</a> or
                <a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsDate5" href="functions/get-first-day-of-quarter.aspx">first day of the quarter</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsDate6" href="functions/get-last-day-of-month.aspx">Get the last day of the month.</a></li>
              <li>Get the <a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsDate7" href="functions/get-days-in-month.aspx">number of days in a month</a> or
                <a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsDate8" href="functions/get-days-in-year.aspx">the number of days in a year.</a></li>
            </ul>
            <h3><a id="_ctl0_ContentPlaceHolder1_HyperLinkStringFunctions" href="functions/index.aspx#StringFunctions">String Functions</a></h3>
            <p>A collection of useful user-defined functions that deal with strings (varchar/char/nvarchar/nchar).</p>
            <ul>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsString1" href="functions/count-character.aspx">Count the number of times a given character occur in a given string.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsString2" href="functions/count-string.aspx">Count the number of times a given search string exists in a given input string.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsString5" href="functions/count-words.aspx">Count the number of words in a given input string.</a></li>
              <li>
                <a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsString3" href="functions/initcap.aspx">Emulate the behavior of Oracle's InitCap string function, which changes the first letter of each word in uppercase and all others in lowercase.</a>
              </li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsString4" href="functions/string-encryption.aspx">Encrypt an input string using a simple encryption algorithm.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsString6" href="functions/trim-leading-zeros.aspx">Trim the leading zeros from a given alphanumeric value.</a></li>
            </ul>
            <h3><a id="_ctl0_ContentPlaceHolder1_HyperLinkTreeFunctions" href="functions/index.aspx#TreeFunctions">Tree Functions</a></h3>
            <p>A collection of useful user-defined functions that deal with tree or hierarchical design structures.</p>
            <ul>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsTree1" href="functions/get-tree-path.aspx">Get the path of a particular node from the parent within a hierarchy/tree-type table structure.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsTree2" href="functions/get-tree-node-level.aspx">Determine the level of a particular node within the hierarchy/tree-type table structure.</a></li>
            </ul>
            <h3><a id="_ctl0_ContentPlaceHolder1_HyperLinkTableValuedFunctions" href="functions/index.aspx#TableValuedFunctions">Table-Valued Functions</a></h3>
            <p>A collection of useful table-valued user-defined functions that can be used to join with other tables.</p>
            <ul>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsTable1" href="functions/integer-table.aspx">Generate a table of integer values from 1 to the maximum input value.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFunctionsTable2" href="functions/comma-delimited-to-table.aspx">Generate a table containing the individual values in a comma-delimited/comma-separated value.</a></li>
            </ul>
            <h3><a id="_ctl0_ContentPlaceHolder1_HyperLinkBuiltInFunctions" href="functions/index.aspx#BuiltInFunctions">SQL Server Built-in Functions</a></h3>
            <p>A reference to all built-in functions available within SQL Server grouped into categories.</p>
            <ul>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkAggregateFunctions" href="functions/aggregate-functions/index.aspx">SQL Server Aggregate Functions</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkConfigurationFunctions" href="functions/configuration-functions/index.aspx">SQL Server Configuration Functions</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkDateAndTimeBuiltInFunctions" href="functions/date-and-time-functions/index.aspx">SQL Server Date and Time Functions</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkMathFunctions" href="functions/math-functions/index.aspx">SQL Server Mathematical Functions</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkStringBuiltInFunctions" href="functions/string-functions/index.aspx">SQL Server String Functions</a></li>
            </ul>
          </div>
        </article>
        <article>
          <header>
            <h1 class="header"><a id="_ctl0_ContentPlaceHolder1_HyperLinkTips" class="header" href="tips/index.aspx">Tips and Tricks</a></h1>
          </header>
          <div>
            <p>A collection of useful SQL Server-related tips and tricks:</p>
            <ul>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkTips1" href="tips/comma-delimited-output.aspx">Returning a comma-delimited output without the use of cursors.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkTips2" href="tips/determine-missing-identity-values.aspx">Easily identify missing identity values.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkTips3" href="tips/generate-random-numbers.aspx">Generate random numbers without using the RAND function.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkTips4" href="tips/generate-random-records.aspx">Generate random records from any table.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkTips5" href="tips/sort-ip-address.aspx">Sort IP addresses that are stored as VARCHAR by their numeric values.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkTips6" href="tips/split-name.aspx">Different ways of splitting a full name to get the first name and last name.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkTips7" href="tips/read-import-excel-file-p01.aspx">Query/read and import an Excel file without using DTS and without importing the data to a SQL table.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkTips8" href="tips/execute-sql-scripts-batch.aspx">Execute a batch of .sql scripts located in a specific directory without manually opening and executing them through Query Analyzer.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkTips9" href="tips/date-formats.aspx">Convert datetime values into different date formats.</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkTips10" href="tips/set-vs-select-assigning-variables.aspx">Compare the SET command against the SELECT statement when assigning values to local variables.</a></li>
            </ul>
            <h3><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages" href="error-messages/msg-1-500.aspx">SQL Server Error Messages</a></h3>
            <p>A list of SQL Server error messages and for certain error messages, discusses ways on how to solve the error or work around them:</p>
            <table border="0" cellpadding="0" cellspacing="0">
              <tbody>
                <tr valign="top">
                  <td>
                    <ul>
                      <li>
                        <a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages1to500" href="error-messages/msg-1-500.aspx">SQL Server Error Message 1 to 500</a>&nbsp;&nbsp;&nbsp;
                        <a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages1to500_es" class="smallerfont" href="es/mensajes-de-error/mensaje-1-500.aspx">Spanish</a>
                        <a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages1to500_fr" class="smallerfont" href="fr/message-d-erreur/message-1-500.aspx">French</a>
                      </li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages501to1000" href="error-messages/msg-501-1000.aspx">SQL Server Error Message 501 to 1000</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages1001to1500" href="error-messages/msg-1001-1500.aspx">SQL Server Error Message 1001 to 1500</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages1501to2000" href="error-messages/msg-1501-2000.aspx">SQL Server Error Message 1501 to 2000</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages2001to3000" href="error-messages/msg-2001-3000.aspx">SQL Server Error Message 2001 to 3000</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages3001to4000" href="error-messages/msg-3001-4000.aspx">SQL Server Error Message 3001 to 4000</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages4001to5000" href="error-messages/msg-4001-5000.aspx">SQL Server Error Message 4001 to 5000</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages5001to6000" href="error-messages/msg-5001-6000.aspx">SQL Server Error Message 5001 to 6000</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages6001to7000" href="error-messages/msg-6001-7000.aspx">SQL Server Error Message 6001 to 7000</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages7001to7500" href="error-messages/msg-7001-7500.aspx">SQL Server Error Message 7001 to 7500</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages7501to8000" href="error-messages/msg-7501-8000.aspx">SQL Server Error Message 7501 to 8000</a></li>
                    </ul>
                  </td>
                  <td>
                    <ul>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages8001to8500" href="error-messages/msg-8001-8500.aspx">SQL Server Error Message 8001 to 8500</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages8501to9000" href="error-messages/msg-8501-9000.aspx">SQL Server Error Message 8501 to 9000</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages9001to9500" href="error-messages/msg-9001-9500.aspx">SQL Server Error Message 9001 to 9500</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages9501to10000" href="error-messages/msg-9501-10000.aspx">SQL Server Error Message 9501 to 10000</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages10001to10500" href="error-messages/msg-10001-10500.aspx">SQL Server Error Message 10001 to 10500</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages10501to11000" href="error-messages/msg-10501-11000.aspx">SQL Server Error Message 10501 to 11000</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages11001to11500" href="error-messages/msg-11001-11500.aspx">SQL Server Error Message 11001 to 11500</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages11501to12000" href="error-messages/msg-11501-12000.aspx">SQL Server Error Message 11501 to 12000</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages12001to13000" href="error-messages/msg-12001-13000.aspx">SQL Server Error Message 12001 to 13000</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages13001to13500" href="error-messages/msg-13001-13500.aspx">SQL Server Error Message 13001 to 13500</a></li>
                      <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkErrorMessages14001to14500" href="error-messages/msg-14001-14500.aspx">SQL Server Error Message 14001 to 14500</a></li>
                    </ul>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
        </article>
        <article>
          <header>
            <h1 class="header"><a id="_ctl0_ContentPlaceHolder1_HyperLinkFAQ" class="header" href="faq/index.aspx">Frequently Asked Questions</a></h1>
          </header>
          <div>
            <h3><a id="_ctl0_ContentPlaceHolder1_HyperLinkFAQSQLServer">SQL Server</a></h3>
            <p>A collection of frequently asked questions about SQL Server grouped by categories:</p>
            <ul>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFAQ7" href="faq/sql-server-tables-p01.aspx">Frequently Asked Questions - SQL Server Tables</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFAQ5" href="faq/data-types-p01.aspx">Frequently Asked Questions - SQL Server Data Types</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFAQ1" href="faq/dates-p01.aspx">Frequently Asked Questions - SQL Server Dates (DateTime / SmallDateTime)</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFAQ6" href="faq/views-p01.aspx">Frequently Asked Questions - SQL Server Views</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFAQ2" href="faq/select-p01.aspx">Frequently Asked Questions - SELECT Statement</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFAQ4" href="faq/insert-p01.aspx">Frequently Asked Questions - INSERT Statement</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFAQ3" href="faq/error-messages-p01.aspx">Frequently Asked Questions - SQL Server Error Messages</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFAQ8" href="faq/oracle-functions-p01.aspx">Frequently Asked Questions - SQL Server Equivalent of Oracle Functions</a></li>
            </ul>
            <h3><a id="_ctl0_ContentPlaceHolder1_HyperLinkFAQSQLServer2005">SQL Server 2005</a></h3>
            <p>A collection of frequently asked questions about SQL Server 2005 grouped by categories:</p>
            <ul>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFAQSQLServer2005Express" href="faq/sql-server-2005-express-p01.aspx">Frequently Asked Questions - SQL Server 2005 Express Edition</a></li>
              <li><a id="_ctl0_ContentPlaceHolder1_HyperLinkFAQVarCharMax" href="faq/sql-server-2005-varchar-max-p01.aspx">Frequently Asked Questions - VARCHAR(MAX), NVARCHAR(MAX), VARBINARY(MAX)</a></li>
            </ul>
          </div>
        </article>
        <article>
          <script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
          <!-- Home Page, Index, Footer Responsive -->
          <ins class="adsbygoogle" style="display: block; height: 280px;" data-ad-client="ca-pub-3546235688736299" data-ad-slot="7121684395" data-ad-format="auto" data-adsbygoogle-status="done" data-ad-status="filled">
            <div id="aswift_3_host" tabindex="0" title="Advertisement" aria-label="Advertisement"
              style="border: none; height: 280px; width: 1118px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;"><iframe id="aswift_3" name="aswift_3"
                style="left:0;position:absolute;top:0;border:0;width:1118px;height:280px;" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" width="1118"
                height="280" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no"
                src="https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-3546235688736299&amp;output=html&amp;h=280&amp;slotname=7121684395&amp;adk=3672353423&amp;adf=1190194197&amp;pi=t.ma~as.7121684395&amp;w=1118&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1699876099&amp;rafmt=1&amp;format=1118x280&amp;url=http%3A%2F%2Fwww.sql-server-helper.com%2F&amp;ea=0&amp;fwr=0&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;dt=1699876099203&amp;bpp=1&amp;bdt=626&amp;idt=254&amp;shv=r20231108&amp;mjsv=m202311020101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;prev_fmts=0x0%2C1118x280%2C1118x280&amp;nras=1&amp;correlator=960390549833&amp;frm=20&amp;pv=1&amp;ga_vid=1314745930.1699876099&amp;ga_sid=1699876099&amp;ga_hid=1649155159&amp;ga_fc=1&amp;u_tz=60&amp;u_his=2&amp;u_h=1200&amp;u_w=1600&amp;u_ah=1200&amp;u_aw=1600&amp;u_cd=24&amp;u_sd=1&amp;adx=241&amp;ady=4634&amp;biw=1600&amp;bih=1200&amp;scr_x=0&amp;scr_y=0&amp;eid=44759876%2C44759927%2C31079406%2C44807461%2C31078297%2C44807763%2C44808148&amp;oid=2&amp;pvsid=2546241506741222&amp;tmod=1044278083&amp;uas=0&amp;nvt=1&amp;fc=1920&amp;brdim=0%2C0%2C0%2C0%2C1600%2C0%2C1600%2C1200%2C1600%2C1200&amp;vis=1&amp;rsz=%7C%7CeEbr%7C&amp;abl=CS&amp;pfx=0&amp;fu=128&amp;bc=23&amp;psd=W251bGwsbnVsbCxudWxsLDNd&amp;ifi=4&amp;uci=a!4&amp;btvi=2&amp;fsb=1&amp;dtd=256"
                data-google-container-id="a!4" data-google-query-id="CN2wy_jzwIIDFYxGkQUdtDIOnQ" data-load-complete="true"></iframe></div>
          </ins>
          <script>
            (adsbygoogle = window.adsbygoogle || []).push({});
          </script>
        </article>
      </div>
    </section>
  </div>
  <div class="google-auto-placed" style="width: 100%; height: auto; clear: both; text-align: center;"><ins data-ad-format="auto" class="adsbygoogle adsbygoogle-noablate" data-ad-client="ca-pub-3546235688736299" data-adsbygoogle-status="done"
      style="display: block; margin: 10px auto; background-color: transparent; height: 280px;">
      <div id="aswift_4_host" style="border: none; height: 280px; width: 1200px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block;"></div>
    </ins></div>
  <footer>
    <div>SQL Server Helper. &nbsp;All rights reserved.</div>
  </footer>
</form>

Text Content

 * Home
 * Articles
 * SQL Server 2012
 * SQL Server 2014
 * SQL Server 2016
 * FAQ
 * Practice Test

Tip of the Day : Similarities and Differences Between GETDATE and SYSDATETIME
Date Functions


WELCOME TO SQL SERVER HELPER !!!

This site is intended for those who are beginning to use SQL Server as part of
their day-to-day activities.  You will find in this site a collection of useful
functions, triggers, stored procedures and tips and tricks related to SQL
Server.

Should you have any comments or questions regarding this site or if you want to
ask SQL Server-related questions, e-mail us here.

We hope we are able to help and we are glad to help!!!




SQL SERVER TIP OF THE DAY - NOVEMBER 13, 2023


SIMILARITIES AND DIFFERENCES BETWEEN GETDATE AND SYSDATETIME DATE FUNCTIONS

Prior to SQL Server 2008, there were only three functions that return the
current system date and time of the computer on which the instance of SQL Server
is running, namely CURRENT_TIMESTAMP, GETDATE and GETUTCDATE.  Beginning with
SQLS erver 2008, three other date functions were introduced namely SYSDATETIME,
SYSDATETIMEOFFSET and SYSUTCDATETIME.

The following article shows the similarities between the GETDATE() date function
and the SYSDATETIME() date function.

Similarities

 * Returns the current date and time of the computer on which the instance of
   SQL Server is running.
 * The time zone offset is not included on both functions.
 * Both functions do not accept a parameter.
 * Both functions are nondeterministic functions. Views and expressions that
   reference these functions in a column cannot be indexed.

Differences

GETDATE()

SYSDATETIME()

Returns a DATETIME value

Returns a DATETIME2(7) value

Returns less fractional seconds precision, only 3 decimal places.

Returns more fractional seconds precision, up to 7 decimal places.

Accuracy is up to 0.00333 seconds.

Accuracy is up to 100 nanoseconds.

Available from SQL Server 2000 and onwards.

Available only from SQL Server 2008 and onwards.

More Tips


SQL SERVER 2012


WHAT'S NEW IN SQL SERVER 2012

 * What's New in SQL Server 2012
 * SQL Server 2012 Editions and Licensing - Frequently Asked Questions
 * SQL Server 2012 Programmability Datasheet
 * SQL Server 2012 Analysis Services Datasheet
 * SQL Server 2012 Master Data Services Datasheet
 * SQL Server 2012 Data Mining Datasheet
 * SQL Server 2012 High Availability Datasheet
 * SQL Server 2012 Maximum Capacity Specifications
 * SQL Server 2012 Server Configuration Options


SQL SERVER 2012 ARTICLES

 * SQL Server 2012 New Date Functions
 * SQL Server 2012 New String Functions
 * SQL Server 2012 New Logical Functions (CHOOSE and IIF)
 * SQL Server 2012 FORMAT String Function Culture
 * SQL Server 2012 Date Formats Using the FORMAT Function and CONVERT Function


SQL SERVER 2008


WHAT'S NEW IN SQL SERVER 2008

A collection of articles related to what's new with SQL Server 2008:

 * Compound Operators
 * Multiple Value Inserts Within a Single INSERT Statement
 * Row Constructor (or Table-Valued Constructor) as Derived Table
 * MERGE Statement
 * Table-Valued Parameters


SQL SERVER 2008 ARTICLES

A collection of articles related to SQL Server 2008:

 * Error in Importing/Exporting Geography/Geometry Columns in SQL Server 2008
   Management Studio
 * SQL Server 2008 to Windows Server 2008 Connection Error 1326
 * Store Locator Using Geography Data Type
 * Convert Latitude/Longitude (Lat/Long) to Geography Point
 * MERGE Statement With Table-Valued Parameters
 * SqlConnection Connection String
 * SQL Server 2008 Date Formats




USER-DEFINED FUNCTIONS


DATE FUNCTIONS

A collection of useful user-defined functions that deal with dates.

 * Determine the age of a person as of today given the birthdate.
 * Determine if it is a leap year.
 * Get the first day of the week, first day of the month or first day of the
   quarter
 * Get the last day of the month.
 * Get the number of days in a month or the number of days in a year.


STRING FUNCTIONS

A collection of useful user-defined functions that deal with strings
(varchar/char/nvarchar/nchar).

 * Count the number of times a given character occur in a given string.
 * Count the number of times a given search string exists in a given input
   string.
 * Count the number of words in a given input string.
 * Emulate the behavior of Oracle's InitCap string function, which changes the
   first letter of each word in uppercase and all others in lowercase.
 * Encrypt an input string using a simple encryption algorithm.
 * Trim the leading zeros from a given alphanumeric value.


TREE FUNCTIONS

A collection of useful user-defined functions that deal with tree or
hierarchical design structures.

 * Get the path of a particular node from the parent within a
   hierarchy/tree-type table structure.
 * Determine the level of a particular node within the hierarchy/tree-type table
   structure.


TABLE-VALUED FUNCTIONS

A collection of useful table-valued user-defined functions that can be used to
join with other tables.

 * Generate a table of integer values from 1 to the maximum input value.
 * Generate a table containing the individual values in a
   comma-delimited/comma-separated value.


SQL SERVER BUILT-IN FUNCTIONS

A reference to all built-in functions available within SQL Server grouped into
categories.

 * SQL Server Aggregate Functions
 * SQL Server Configuration Functions
 * SQL Server Date and Time Functions
 * SQL Server Mathematical Functions
 * SQL Server String Functions


TIPS AND TRICKS

A collection of useful SQL Server-related tips and tricks:

 * Returning a comma-delimited output without the use of cursors.
 * Easily identify missing identity values.
 * Generate random numbers without using the RAND function.
 * Generate random records from any table.
 * Sort IP addresses that are stored as VARCHAR by their numeric values.
 * Different ways of splitting a full name to get the first name and last name.
 * Query/read and import an Excel file without using DTS and without importing
   the data to a SQL table.
 * Execute a batch of .sql scripts located in a specific directory without
   manually opening and executing them through Query Analyzer.
 * Convert datetime values into different date formats.
 * Compare the SET command against the SELECT statement when assigning values to
   local variables.


SQL SERVER ERROR MESSAGES

A list of SQL Server error messages and for certain error messages, discusses
ways on how to solve the error or work around them:

 * SQL Server Error Message 1 to 500    Spanish French
 * SQL Server Error Message 501 to 1000
 * SQL Server Error Message 1001 to 1500
 * SQL Server Error Message 1501 to 2000
 * SQL Server Error Message 2001 to 3000
 * SQL Server Error Message 3001 to 4000
 * SQL Server Error Message 4001 to 5000
 * SQL Server Error Message 5001 to 6000
 * SQL Server Error Message 6001 to 7000
 * SQL Server Error Message 7001 to 7500
 * SQL Server Error Message 7501 to 8000

 * SQL Server Error Message 8001 to 8500
 * SQL Server Error Message 8501 to 9000
 * SQL Server Error Message 9001 to 9500
 * SQL Server Error Message 9501 to 10000
 * SQL Server Error Message 10001 to 10500
 * SQL Server Error Message 10501 to 11000
 * SQL Server Error Message 11001 to 11500
 * SQL Server Error Message 11501 to 12000
 * SQL Server Error Message 12001 to 13000
 * SQL Server Error Message 13001 to 13500
 * SQL Server Error Message 14001 to 14500


FREQUENTLY ASKED QUESTIONS


SQL SERVER

A collection of frequently asked questions about SQL Server grouped by
categories:

 * Frequently Asked Questions - SQL Server Tables
 * Frequently Asked Questions - SQL Server Data Types
 * Frequently Asked Questions - SQL Server Dates (DateTime / SmallDateTime)
 * Frequently Asked Questions - SQL Server Views
 * Frequently Asked Questions - SELECT Statement
 * Frequently Asked Questions - INSERT Statement
 * Frequently Asked Questions - SQL Server Error Messages
 * Frequently Asked Questions - SQL Server Equivalent of Oracle Functions


SQL SERVER 2005

A collection of frequently asked questions about SQL Server 2005 grouped by
categories:

 * Frequently Asked Questions - SQL Server 2005 Express Edition
 * Frequently Asked Questions - VARCHAR(MAX), NVARCHAR(MAX), VARBINARY(MAX)



SQL Server Helper.  All rights reserved.