Forum Replies Created

Viewing 15 posts - 106 through 120 (of 329 total)

  • 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 3 years, 11 months ago by  mtz676.
    • This reply was modified 3 years, 11 months ago by  mtz676.
    • This reply was modified 3 years, 11 months ago by  mtz676.
    • This reply was modified 3 years, 11 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 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...

    • This reply was modified 4 years 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 ago by  mtz676.
    • This reply was modified 4 years 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,...

  • 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.

  • Reply To: Table Alerts

    @scottpletcher, @grant

    Yes, it has to be an email address.

    I will be needing it to be in this format as below.The respective network gateway domains will be sending text...

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

    Thanks @scott

    I was using dateadd but not the way you built it and hence did not work.

    And how do I get the message to the right person

    EXEC msdb.dbo.sp_send_dbmail

    @recipients...

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

    CREATE TABLE [dbo].[DND](
    [IN] [varchar](50) NULL,
    [P] [bigint] NULL,
    [N] varchar(100),
    [A] [varchar](100) NULL,
    [D] [datetime] NULL
    ) ON [PRIMARY]
    GO



    insert into [DND].[dbo].[DND]([IN],P,N,A,D) values ('A',1111111111,'txt.att.net','MA','2020-11-24 13:00:00.000')
    insert into [DND].[dbo].[DND]([IN],P,N,A,D) values ('B',2222222222,'messaging.sprintpcs.com','MB','2020-11-25 14:00:00.000')
    insert...

Viewing 15 posts - 106 through 120 (of 329 total)