Can some one help me out with an Ms Sql query that Iam trying to develop for building the calling list?
I have a temperory table that has the custom fields and also the contact info(mobile,business,home) in a single row.And based on if any one of the contact info is null or not I would need to create 2-3 rows in the final calling list table along with the chain id,chain_n and the other mandatory fields.
I did try creating some sql scripts based on my exp on pl\sql but it doesnt seems to be working well with mssql.So if some one has some sample scripts, which I can use as a reference, it would be helpful and save me of a lot of time.
The calling lists should be created using OCM, but previously defining the format (structure) of the table using CME. You can’t create tables directly on the DB.
Cav, Yes you can create calling list tables, you just have to make sure that your table has enough fields, correct type of fields, primary key and indexes. The last are optional as OCM will recognize missing indexes and will offer you to create them for you.
Jason, what exactly does not work? Can you describe the errors you are getting?
Sorry Cav, what for you need stored procedure for calling list? When you create new calling list through OCM, not a single stored procedure is created.
Yes, this is but connected to campaigns and not to calling lists directly. When you load your campaign which is using particular calling list for first time, OCS creates these stored procedures to manage contacts in calling lists.
Iam facing an issue with getting the right logic to loop through the temp table and check for each record …if an record has all the three contact info then insert this record into the final calling list table as 3 records along with the other mandantory fields like chainid,chain_n etc.And if a record doesnt have all the 3 contact info then check for null values and then insert this record into the final calling list accordingly.
Sorry I couldn’t reply to your comment earlier …i was caught in some other issues and this went into the back burner
Basically, Iam trying to get the right sql script logic to do the data transformation .The staging table from where I need to tranform to the final calling list table has around 50 cols…the staging table has 3 cols which has the customer ph no.So I will to check out for null values and based on it I would have to insert it into the final calling list table …and along with this I would also need to assign the chain_n,record id and the other mand fields.
The only way I can think of is by using case statements …but with case statements and 50 cols the sql query would be huge and Iam concerned that it would have performance impact aswell .So I wanted to check if there is any better way of doing it ???