Hello @Jane Dickson ,
Thanks for the ask and using Microsoft Q&A platform .
When i see your query , I see that you are concatenating the fields to make a string and that was the Twillio API are going to consume . Since its passed as a string its will take abd char(13) and not as a new line character . The solution which I am sharing is a overkill ( as per me ) but hopefully its gives you an idea and you can improve on the same .
I my case the I have the records in EH and I created a query something like this .
select concat('''device 1:',deviceId ,''' + char(13) +','''device 2:',deviceId,'''') as message
into SQLOP from EHInput
OP : Something like ( this is what is going to go in SQL table .
'device 1:2' + char(13) +'device 2:2'
IN SQL run the below query and you should have the required output .
DECLARE @message VARCHAR(50)
DECLARE @formattedmessage VARCHAR(256)DECLARE db_cursor CURSOR FOR
SELECT message from ASATestOPEN db_cursor
FETCH NEXT FROM db_cursor INTO @messageWHILE @@Fetch _STATUS = 0
BEGIN
SET @formattedmessage = (@message)
SELECT (@formattedmessage)
FETCH NEXT FROM db_cursor INTO @message
ENDCLOSE db_cursor
DEALLOCATE db_cursor
----------
Please do let me know how it goes .
Thanks
Himanshu
-------------------------------------------------------------------------------------------------------------------------
- Please don't forget to click on or upvote button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
- Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators