Note that there are some explanatory texts on larger screens.

plurals
  1. POInsert into table using multiple select
    primarykey
    data
    text
    <p>I am working on creating stores procedure to insert values in table using select statement. Following is my queuedemail table where i want to insert rows from two diffrent tables.</p> <pre><code>Id int Unchecked Priority int Unchecked [From] nvarchar(500) FromName nvarchar(500) [To] nvarchar(500) ToName nvarchar(500) CC nvarchar(500) Bcc nvarchar(500) Subject nvarchar(1000) Body nvarchar(MAX) </code></pre> <p>First table is campaign which is to be sent to customer</p> <pre><code>Id int Name nvarchar(MAX) Subject nvarchar(MAX) Body nvarchar(MAX) Sent bit </code></pre> <p>I want to take body and subject from this campaign to insert in above table. and there are some tokens in the body which i want to replace with customer name. Now customer values are going to come from customer tables which is having diffrent fields like name, email. Now to and toname in first table are going to come from this customer table.</p> <p>Any suggestion.</p> <p>Pardon if not understood. Leave comment if any!!!</p> <p>Suppose I have customer table with 2 entries like</p> <pre><code>Id F_Name L_Name Email 1 Nitin Varpe fedexnit@gmail.com 2 Prashant Bankar pbankar@yahoo.com </code></pre> <p>Now i have campign having body like</p> <p>Dear %Customer.Name% </p> <p>//here goes body for the campaign</p> <p>Now when I click send campaign. This token quoted in '%' going to be replaced with customer name.and then this body should be inserted in queuedemail table 'to' column by email of customer and toname same as customer name.</p> <p>Thanx all for ur response.</p> <p>Hoping to see more from u!!!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload