using SQL Lite Studio for export\import DB editor

using SQL Lite Studio for export\import DB editor

Postby Warriors11 » Sat Apr 30, 2022 10:48 am

hopefully this is a quick and easy question

I know how and am comfortable with export\import and using SQL Lite Studio (still prefer Access or Excel, but I understand the reasons for the SQL lite...)

I want to make what should be a simple adjustment to all player salaries (basically a formula that sets all salaries at 10% of current value - so X*.10)

why? because players are all whiny overpaid ninnys? No - just trying to run a fictional historical side by side with the NCAA game that starts in 1980. this https://www.spotrac.com/nba/cba/ shows me the salary cap back in 1984 was 3.6M (so I am starting there as a close enough) so now I have a perfectly configured file for both NCAA and Pro - but every single pro salary is way too high and every team is at 50x over the cap. not a huge deal, but immersion is everything and I would love for this league to have a finance structure that mostly mirrors the real rise in NBA finances. So I am all clear on what I want to do.

THE QUESTION - can anyone show me an easy way to use SQL Lite Studio to apply a simple formula to those salary columns - for example in excel I would simply copy the modifier value I want (so as an example .1 for 10%) select all of the 9 contract columns and all data and then paste special - choosing multiply. just like that every contract would be at 10% of original value. takes longer to type this then it would take to do in excel. But I have been poking around SQL Lite Studio and have yet to find a solution. Hopefully someone reads this and knows a quick and easy way to accomplish this.


also bonus credit - on a different modern league I edited Warriors owner Joe Lacob to be a 5 in spending money (in game I think he was a 2, in real life he has proven he has that dial jacked up to 11!) it shows correctly in the SQL data - and other data I have edited has come into league on edit - but for some reason the owner qualities dont seem to work in import - anyone else done this with success (or even failure which means it could be a bug)

any help would be appreciated.
Warriors11
Member
 
Posts: 291
Joined: Tue Jan 23, 2007 4:44 pm

Re: using SQL Lite Studio for export\import DB editor

Postby Warriors11 » Sat Apr 30, 2022 10:34 pm

OK - I think I found a solution and am posting here in case anyone else is interested (and so when I forget 3 months from now I can look back and remember)

so I ran this query and it worked

UPDATE Players SET ContractYear1 = ContractYear1 * .01


the general concept is discussed here: https://stackoverflow.com/questions/744 ... ain-number

it seems to have worked (at least within the DB) my one concern is because I calculated at 10% of existing I went from all whole dollars to now a great deal of pennies. Not sure how that is going to impact the re-import. My guess is 50/50 - either ignores it and works fine, or bricks the whole thing. No worries I have multiple backups (never try to do this stuff on data you dont have backed up) I will test it out and report back. I will also need to do it for each contract column - but I figure I should test first and if it all goes to hell I will figure out how to make sure that collumn gets rounded to whole numbers. there is always a way, just a matter of how much time I want to spend finding it. this is after all supposed to be the thing I do as relaxation.
Warriors11
Member
 
Posts: 291
Joined: Tue Jan 23, 2007 4:44 pm

Re: using SQL Lite Studio for export\import DB editor

Postby Warriors11 » Sat Apr 30, 2022 10:36 pm

also hoping one of the board admins can correct my senior moment and move this to the pro thread.

Nothing like a how do I edit pro salaries in the college game thread. I will go with Monty Python - I somehow managed to be really smart and really stupid at the same time
Warriors11
Member
 
Posts: 291
Joined: Tue Jan 23, 2007 4:44 pm

Re: using SQL Lite Studio for export\import DB editor

Postby PointGuard » Sat Apr 30, 2022 11:05 pm

Hey Warriors: Check out this site about how to use CEIL in SQL Lite to round up a number or result of an equation to the next nearest integer...seems like that should get rid of your cents issue:

https://learnsql.com/cookbook/how-to-ro ... er-in-sql/
Dynasty Threads:
Fedora-CB;Town Crier-CB;FIve Friends/Foes-CB;Media Perspective-CB;Whatever It Takes-CB;Who's Bret Vandergard-CB;Gym Rat-CB;Repairman-CB;S. Mastroani-TPG;V. Stevenson-TPG
User avatar
PointGuard
DDS:CB Support Squad
 
Posts: 13265
Joined: Mon Dec 17, 2007 1:14 am

Re: using SQL Lite Studio for export\import DB editor

Postby Warriors11 » Sun May 01, 2022 4:04 pm

PointGuard wrote:Hey Warriors: Check out this site about how to use CEIL in SQL Lite to round up a number or result of an equation to the next nearest integer...seems like that should get rid of your cents issue:

https://learnsql.com/cookbook/how-to-ro ... er-in-sql/


thank you for the suggestion - I am going to try that now
Warriors11
Member
 
Posts: 291
Joined: Tue Jan 23, 2007 4:44 pm


Return to DDS: College Basketball 2022 General Discussion

Who is online

Users browsing this forum: Google [Bot] and 2 guests