SQL text loading order

rsc2a

Warlord
Joined
Jun 23, 2020
Messages
131
I've got a question that probably has a very easy answer.

I've got a .sql file where I'm putting in text changes as I make tweaks to other mods. The idea is that I have all my text changes in one central location. The hiccup seems to be that my...

UPDATE Language_en_US
SET Text ='....'
WHERE Tag = '...';

...isn't loading (likely being overwritten?). Other changes in the file (e.g. INSERT INTO) are carrying through so I know the file is loading. What do I do to fix this? Thanks!
 
the easiest fix, in theory, is just to click this one last in the mod menu. In some cases, it seems the order gets re-arranged anyway, but most of the time this should fix any mod load order issues.

Its possible however that your SQL is failing on some command prior to this one -- civ will run the SQL commands in the order they're listed until one fails, then it won't load anymore in that file. Its possible to have a portion of your database changes go through as expected, and others not to work at all, if the SQL fails midway through. This is usually due to syntax -- a missing or extra comma, a missing SQL identifier, etc. However catching these can be more difficult than it sounds. That said, if the top of the file is loading correctly, and the bottom is loading correctly, but its some part in between, then you are probably correct that its being over-written; double-check that at least one of the SQL updates AFTER this one is loading correctly, to narrow down the issue.

If its an obscure syntax issue, you could workaround this by recreating your update in xml instead, somehow this usually works out to be less error-prone (but far more tedious). Alternatively, paste your code block here, I will give it a glance and let you know if I see anything missing (I make this same error a lot)
 
Last edited:
Your second paragraph got it. I had a single ' where I needed a double '' in the text line.
 
Top Bottom