Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

bobrien100

@bobrien100
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Welcome to America
    B bobrien100

    To go from Detroit to Chicago, consider the train. Amtrak goes from just north of downtown Detroit right into Chicago's loop. Driving into Chicago is a real gamble on traffic.

    The Lounge com question code-review

  • Welcome to America
    B bobrien100

    The Art Institute is on Woodward Ave. Greenfield Village in Dearborn. Mexican town has 2 good restaurants (Xochimilco and El Zocalo) from my memory. Cruise Lake Shore Drive in the Grosse Pointes. The downtown is interesting. Cranbrook and some lovely homes in Bloomfield Hills. Birmingham and Royal Oak are fun towns. I grew up in Detroit. I now live in Chicago.

    The Lounge com question code-review

  • How can i select all dates between date range?
    B bobrien100

    You could accomplish this with a script rather than a single query. I have not run this and if you are allergic to table vars then stop reading. Presuming you have a begin date that is less than or equal to the end date you can proceed like this...

    declare @loopDate as datetime
    declare @dateRange as table ( aDate datetime )

    set @loopDate = @beginDate
    insert into @dateRange (aDate) values (@loopDate ) -- beginning of your date range

    while @loopDate < @endDate
    begin
    Dateadd(day, @loopDate, 1)
    insert into @dateRange (aDate) values (@loopDate )
    end

    select aDate, isnull(quantity, 0)
    from
    yourTable a
    left outer join @dateRange b on
    b.aDate = a.Productiondate

    I have not tested this. There might be a syntax flaw. Flame away. - Bill O'Brien

    Database database question tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups