Editing
Vision Global TicketSalesScript
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<nowiki>------------------------------------------------------------------------------</nowiki> -- check to verify the ticket import completed succesfully, change date to the day you run the import <nowiki>------------------------------------------------------------------------------</nowiki> ( SELECT EventCode FROM TicketEventCodes WHERE CAST(CreatedDate AS DATE) = CAST(getdate() as date) ) <nowiki>------------------------------------------------------------------------------</nowiki> -- Change date to date of most recent ticket import <nowiki>------------------------------------------------------------------------------</nowiki> -- check to verify no records returned in following query. If so, do not run anything below <nowiki>------------------------------------------------------------------------------</nowiki> SELECT * FROM TicketSales WHERE distid >= 2147483647 AND EventCode IN ( SELECT EventCode FROM TicketEventCodes WHERE CAST(CreatedDate AS DATE) = CAST(getdate() as date) ) <nowiki>------------------------------------------------------------------------------</nowiki> -- Run top query and copy sponsor ids into second query <nowiki>------------------------------------------------------------------------------</nowiki> -- Update distIDs in first query to have sponsor of current sponsor. Usually returns 3 distIDs. -- aka update sponsor of distIDs in first query to their sponsor's sponsor <nowiki>------------------------------------------------------------------------------</nowiki> select * from DistributorDetail where sponsorid >= 2147483647 and distid < 2147483647 select DistID, SponsorID, * from distributordetail where distid in () update DistributorDetail set SponsorID = , UplineDID = where distid = <nowiki>------------------------------------------------------------------------------</nowiki> -- Run queries and change "select *" to "Delete" and run <nowiki>------------------------------------------------------------------------------</nowiki> select * from Payment where orderid in ( select OrderID from orders where distid >= 2147483647 ) select * from orderlines where orderid in ( select OrderID from orders where distid >= 2147483647 ) select * from orders where distid >= 2147483647 select * from DistributorDetail where distid >= 2147483647 select * from Distributor where distid >= 2147483647
Summary:
Please note that all contributions to Prodigix Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Prodigix Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Prodigix Internal
Client Setup
MediaWiki home
Prodigix Clients
Clients
Client Setup
Tools
What links here
Related changes
Special pages
Page information