Forum Replies Created

Viewing 15 posts - 31 through 45 (of 179 total)

  • Reply To: Customers count on first of the month report

    Does it have to be a query using variables etc?

    In theory you can get the first of each month and then do a group by with your distinct count of...

  • Reply To: SQL Features Explorer

    Intresting

    I always feel like im not using so much of the available stuff that SQL Server offers.

    Most of the stuff i discover is from reading forum replies here.

  • Reply To: Alternative to LAG(SUM) - Can a Column Reference The Sum of the Values Above It

    Maybe someone else understood what you want, i myself am totally lost at what ur problem is or even what ur trying to achieve.

    Always provide sample code, because text descriptions...

  • Reply To: Sum query two table

    This should do the trick:

    Identify the columns you want to group by --> ID_Order, ID_Product from either table

    Identify the columns you want to aggregate --> IN.Amount, Out.Amount

    Identify the columns you...

  • Reply To: Get total no of minutes by hour hand between two dates

    Something like this?

    Creating the 2 Tables

    select CDMLOCID = '201', CDMPOLL = cast('2021-06-20 00:00:00.000' as datetime2), JOBCODE = '10', DATETIMEIN = cast('2021-06-20 10:32:00.000' as datetime2), DATETIMEOUT = cast('2021-06-20...
  • Reply To: How to create dynamic number of TSQL variables?

    Phil Parkin wrote:

    ktflash wrote:

    Phil Parkin wrote:

    What is the source data for this? Where do these variables come from? What will the 'dynamic string' be used for, once it has...

  • Reply To: How to create dynamic number of TSQL variables?

    Phil Parkin wrote:

    What is the source data for this? Where do these variables come from? What will the 'dynamic string' be used for, once it has been created?

     

    I am experimenting...

  • Reply To: How to create dynamic number of TSQL variables?

    Phil Parkin wrote:

    That does not look feasible to me.

    It would be helpful if you could explain the background and reasons for trying to do this – there may be some...

    • This reply was modified 5 years, 1 months ago by ktflash.
  • Viewing 15 posts - 31 through 45 (of 179 total)