Extended Search
Babakov.Net
Home Contacts Rules
  • Login
    Registration Forgot password?
Home Contacts Rules
  • Algorithms 0
  • Programming 2
    • C++ 0
    • .NET C# 2
    • Python 0
    • Java Script 0
  • Databases 12
    • MSSQL 10
    • Oracle 2
    • MySQL 0
  • Design 0
  • Any stuff 2
Software Developer Blogs & Notes » Tag cloud » range
Home

An example of selecting a range of dates in MSSQL

An example of selecting a range of dates

WITH    q AS
        (
        SELECT  1 AS num
        UNION ALL
        SELECT  num + 1
        FROM    q
        WHERE   num < 10
        )
SELECT  DATEADD(DAY,0,cast(cast(DATEADD(DAY,-num,SYSDATETIME()) as date) as datetime))   
FROM    q
Databases / MSSQL
Read more
5
  • complaint
  • 14
  • 0
  • Roman from 4-09-2023, 11:38

Popular articles

  1. An example of selecting a range of dates in MSSQL MSSQL
  2. Example, how to cath error in MSSQL MSSQL
  3. An example searching of procedure by text it contain MSSQL

Tags Cloud

C# catalog catch cmdshell config date dynamic error fetch folder ftp ftpd interpolated string join linux mssql numbers oracle procedure range restart rollback rows sequence serch session sevice sql string stuff text top transaction tsql ubunu update version XDocument xml xp_cmdshell
Show all tags
  • Categories
    Advanced search Latest articles Latest comments Mobile version of Website
  • Customers
    Homepage Rules Registration Statistics
  • Socials
    Telegram
Copyright © 2005–2023 Babakov.Net All Rights Reserved. Powered by Babakov Roman © 2023