|
|
| Line 9: |
Line 9: |
| Proceed to the .35, pull files you saved from .33 to .35 <br/> | | Proceed to the .35, pull files you saved from .33 to .35 <br/> |
| Once you have pulled the files from .35 head to C:\Inetpub\wwwroot\Prodigix Services\Ticket Import\Upload, and place both files in at the same time. <br/> | | Once you have pulled the files from .35 head to C:\Inetpub\wwwroot\Prodigix Services\Ticket Import\Upload, and place both files in at the same time. <br/> |
| The files will be moved and processed at the same time, you will then run the script's below to make sure the data was imported correct on the SQL server, 173. VisionGLobal_Live, once you have ran the scripts the import will be successful. | | The files will be moved and processed at the same time, you will then run the script's below to make sure the data was imported correct on the SQL server, 173. VisionGLobal_Live, once you have ran the scripts the import will be successful. |
| | |
| <nowiki>------------------------------------------------------------------------------</nowiki><nowiki><br/></nowiki>
| |
| | |
| -- check to verify the ticket import completed succesfully, change date to the day you run the import<nowiki><br/></nowiki>
| |
| | |
| <nowiki>------------------------------------------------------------------------------</nowiki><nowiki><br/></nowiki>
| |
| | |
| ( SELECT EventCode <nowiki><br/></nowiki>
| |
| | |
| FROM TicketEventCodes <nowiki><br/></nowiki>
| |
| | |
| WHERE CAST(CreatedDate AS DATE) = '10/17/2022' <nowiki><br/></nowiki>
| |
| | |
| )
| |
| | |
| <nowiki>------------------------------------------------------------------------------</nowiki> <nowiki><br/></nowiki>
| |
| | |
| -- Change date to date of most recent ticket import <nowiki><br/></nowiki>
| |
| | |
| <nowiki>------------------------------------------------------------------------------</nowiki> <nowiki><br/></nowiki>
| |
| | |
| -- check to verify no records returned in following query. If so, do not run anything below <nowiki><br/></nowiki>
| |
| | |
| <nowiki>------------------------------------------------------------------------------</nowiki> <nowiki><br/></nowiki>
| |
| | |
| SELECT * <nowiki><br/></nowiki>
| |
| | |
| FROM TicketSales <nowiki><br/></nowiki>
| |
| | |
| WHERE distid >= 2147483647 <nowiki><br/></nowiki>
| |
| | |
| AND EventCode IN <nowiki><br/></nowiki>
| |
| | |
| ( <nowiki><br/></nowiki>
| |
| | |
| SELECT EventCode <nowiki><br/></nowiki>
| |
| | |
| FROM TicketEventCodes <nowiki><br/></nowiki>
| |
| | |
| WHERE CAST(CreatedDate AS DATE) = CAST(getdate() as date) <nowiki><br/></nowiki>
| |
| | |
| ) <nowiki><br/></nowiki>
| |
| | |
| <nowiki>------------------------------------------------------------------------------</nowiki> <nowiki><br/></nowiki>
| |
| | |
| -- Run top query and copy sponsor ids into second query <nowiki><br/></nowiki>
| |
| | |
| <nowiki>------------------------------------------------------------------------------</nowiki> <nowiki><br/></nowiki>
| |
| | |
| -- Update distIDs in first query to have sponsor of current sponsor. Usually returns 3 distIDs. <nowiki><br/></nowiki>
| |
| | |
| -- aka update sponsor of distIDs in first query to their sponsor's sponsor <nowiki><br/></nowiki>
| |
| | |
| <nowiki>------------------------------------------------------------------------------</nowiki> <nowiki><br/></nowiki>
| |
| | |
| select * <nowiki><br/></nowiki>
| |
| | |
| from DistributorDetail <nowiki><br/></nowiki>
| |
| | |
| where sponsorid >= 2147483647 <nowiki><br/></nowiki>
| |
| | |
| and distid < 2147483647 <nowiki><br/></nowiki>
| |
| | |
| <nowiki><br/></nowiki>
| |
| | |
| select DistID, SponsorID, * <nowiki><br/></nowiki>
| |
| | |
| from distributordetail <nowiki><br/></nowiki>
| |
| | |
| where distid in () <nowiki><br/></nowiki>
| |
| | |
| <nowiki><br/></nowiki>
| |
| | |
| update DistributorDetail <nowiki><br/></nowiki>
| |
| | |
| set SponsorID = , UplineDID = <nowiki><br/></nowiki>
| |
| | |
| where distid = <nowiki><br/></nowiki>
| |
| | |
| <nowiki>------------------------------------------------------------------------------</nowiki> <nowiki><br/></nowiki>
| |
| | |
| -- Run queries and change "select *" to "Delete" and run <nowiki><br/></nowiki>
| |
| | |
| <nowiki>------------------------------------------------------------------------------</nowiki> <nowiki><br/></nowiki>
| |
| | |
| select * <nowiki><br/></nowiki>
| |
| | |
| from Payment <nowiki><br/></nowiki>
| |
| | |
| where orderid in <nowiki><br/></nowiki>
| |
| | |
| ( select OrderID <nowiki><br/></nowiki>
| |
| | |
| from orders <nowiki><br/></nowiki>
| |
| | |
| where distid >= 2147483647 <nowiki><br/></nowiki>
| |
| | |
| )
| |
| | |
| select * <nowiki><br/></nowiki>
| |
| | |
| from orderlines <nowiki><br/></nowiki>
| |
| | |
| where orderid in <nowiki><br/></nowiki>
| |
| | |
| (
| |
| | |
| select OrderID <nowiki><br/></nowiki>
| |
| | |
| from orders <nowiki><br/></nowiki>
| |
| | |
| where distid >= 2147483647 <nowiki><br/></nowiki>
| |
| | |
| )
| |
| | |
| select * <nowiki><br/></nowiki>
| |
| | |
| from orders <nowiki><br/></nowiki>
| |
| | |
| where distid >= 2147483647 <nowiki><br/></nowiki>
| |
| | |
| select * <nowiki><br/></nowiki>
| |
| | |
| from DistributorDetail <nowiki><br/></nowiki>
| |
| | |
| where distid >= 2147483647 <nowiki><br/></nowiki>
| |
| | |
| select * <nowiki><br/></nowiki>
| |
| | |
| from Distributor <nowiki><br/></nowiki>
| |
| | |
| where distid >= 2147483647<br />
| |