Forum Replies Created

Viewing 15 posts - 121 through 135 (of 348 total)

  • Reply To: While loop

    Hello Brain, I guess I was not clear enough before. I have explained it again and hope it is clear.

    I will explore CTE's.

    Thanks for taking time to read through it.

    • This reply was modified 4 years, 8 months ago by mtz676.
    • This reply was modified 4 years, 8 months ago by mtz676.
  • Reply To: While loop

    @scott,

    Yes it did for most part of it.

    The stored procedure takes Name, month or day as input and generates records accordingly.The records are generated as expected but for Dt2 column...

    • This reply was modified 4 years, 8 months ago by mtz676.
  • Reply To: update table

    thanks

  • Reply To: nested while

     

    got it

        DECLARE @I int = 1
    DECLARE @R int = 2
    DECLARE @Q int = 3
    DECLARE @Q1 int
    SET @Q1 =@Q
    DECLARE @N varchar(100)
    SET @N =...

    • This reply was modified 4 years, 9 months ago by mtz676.
    • This reply was modified 4 years, 9 months ago by mtz676.
    • This reply was modified 4 years, 9 months ago by mtz676.
    • This reply was modified 4 years, 9 months ago by mtz676.
  • Reply To: nested while

    abridged version of what I need

  • Reply To: nested while

    thanks for the response but I need it only with a nested while loop.

  • Reply To: CMS

    I would like to save the output on the CMS server itself.

  • Reply To: string selection

    Hello Michael and Phil and All

    When I am stuck in a particular query in the bigger scheme of things I intend to describe only that part of the problem which...

  • Reply To: CMS

    Thank you

  • Reply To: Table Alerts

    DECLARE @EN VARCHAR(50)
    DECLARE @PN varchar(60)
    DECLARE @EA varchar(50)
    DECLARE @CE varchar(100)
    DECLARE @DtT datetime
    DECLARE @body varchar(150)
    DECLARE MCursor CURSOR LOCAL FAST_FORWARD READ_ONLY FOR
    SELECT PN,EA,PN+'@'+EA,CONVERT(VARCHAR(10), CAST(DtT AS TIME), 0)from TableName
    OPEN MCursor;
    WHILE 1=1
    BEGIN
    FETCH...

    • This reply was modified 4 years, 9 months ago by mtz676.
  • Reply To: Table Alerts

    @ScottPletcher

    DECLARE @EN VARCHAR(50)
    DECLARE @PN varchar(60)
    DECLARE @EA varchar(50)
    DECLARE @CE varchar(100)
    DECLARE @DtT datetime
    DECLARE @body varchar(150)
    DECLARE MCursor CURSOR LOCAL FAST_FORWARD READ_ONLY FOR
    SELECT PN,EA,PN+'@'+EA,CONVERT(VARCHAR(10), CAST(DtT AS TIME), 0)from TableName
    OPEN MCursor;
    WHILE 1=1
    BEGIN
    FETCH...

    • This reply was modified 4 years, 9 months ago by mtz676.
  • Reply To: Table Alerts

    Agree. Testing this for some other use case.

    Got it working.Please ignore.Thanks

    I am getting a message in this format.

    Subject : Test Mail

    Test:RTatJan 1 1900 1:20PM

    Why am I getting...

    • This reply was modified 4 years, 9 months ago by mtz676.
    • This reply was modified 4 years, 9 months ago by mtz676.
  • Reply To: Table Alerts

    Works .Thanks

  • Reply To: Table Alerts

    @ScottPletcher @grantFitchey

    I got the emails working .

    I still cant get this to work:

    WHERE

    D >= DATEADD(MINUTE, DATEDIFF(MINUTE, 0, GETDATE()) / 15 * 15, 0) AND

    D < DATEADD(MINUTE, DATEDIFF(MINUTE, 0, GETDATE()) /...

  • Reply To: Table Alerts

    My Date format: 2020-11-22 14:50:00.000

    The query is not pulling the record which are within 15mins away from current time.

Viewing 15 posts - 121 through 135 (of 348 total)