Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

STreamling Declare and SET SQL Statements

Is there a way to do this any more effeciantly?

--Setup Load Balancing for Mail servers
        DECLARE @FromName AS VARCHAR(300)
        DECLARE @SenderEmail AS VARCHAR(300)
        DECLARE @Replyto AS VARCHAR(300)
        DECLARE @ReplyName AS VARCHAR(300)
 
---- Create the variables for the random number generation

        SET @FromName = (SELECT FromName FROM dbo.MailServer WHERE MailServer = 'sendgrid')
        SET @SenderEmail = (SELECT SenderEmail FROM dbo.MailServer WHERE MailServer = 'sendgrid')
        SET @Replyto = (SELECT ReplyTo FROM dbo.MailServer WHERE MailServer = 'sendgrid')
        SET @ReplyName = (SELECT ReplyName FROM dbo.MailServer WHERE MailServer = 'sendgrid')
ASKER CERTIFIED SOLUTION
Avatar of Robert Schutt
Robert Schutt
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Larry Brister

ASKER

Thanks