Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

TSQL auto renewal subscription handling

Posted on 2014-12-30
1
Medium Priority
?
117 Views
Last Modified: 2015-01-30
hello ,
i have a problem how i can handle the subscription first i have 3 kinds of updateType , if the updateType = 1 mean its New Subscription , if updatetype equal to 2 mean Unsubcription and updatetype = 3 for modification and on the latest one i has a 1 fields with rentSucess : false mean the operator not able to charge the user and if its true mean the operator able to charge the user .

the problem that the operator will not send me everytime when he try to charge the users i should automaticly renew the susbcription ( subscription type its daily )

he only send me updatetype = 3 when he fails on charging and once he sucess he will send me updatetpye =3 with rentsucess = true in this case i will automatily extend his subcription for 1 days more  , whene the update type = 3 with rentsucess = false the auto-renewal will be on HOLD once i get new modification with sucess rent the auto renewal work again ..

if i run a agent job how i can handle the modifcation and also the auto daily renewal .
0
Comment
Question by:afifosh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 28

Accepted Solution

by:
Ryan McCauley earned 2000 total points
ID: 40536827
I'm not sure exactly what you're asking here - are you receiving some kind of CSV file that you're trying to import and merge into an existing table that contains customers with their current status, or are you receiving messages via a TSQL endpoint, or something else entirely? If you can elaborate on the whole process and each of the pieces (ideally with a diagram of some kind), we may be able to better assist you.

If you're just merging in new data to an existing table, then you can use an UPDATE statement to join the two tables and set the status of the customer based on the results of the most recent attempt to charge them (along with automatically extending their expiration date by a day, if necessary). If the person isn't updated from the file, you can issue a second update that extends them by a day as long as they're in good standing.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question