Vision Global: Difference between revisions

From Prodigix Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
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 />

Revision as of 22:13, 8 March 2023

Customizations:


Imports:
Vision Global has two imports they will request, they will send you files for both imports.
Data Dump import and Ticket Sales import.

Ticket Sales Import:
The ticket sales import will require you to save the files to the .33 server in "c$\temp" folder you will rename the files to "TicketSales_JAN 23" and "eventDetail_JAN 23" OR the specified month for example "eventDetail_FEB 23" --MAKE SURE THE MONTH IS 3 CHARACTERS AND NOT LONGER--
Proceed to the .35, pull files you saved from .33 to .35
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.
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.