[Koha] SQL field lengths

LAURENT Henri-Damien henridamien.laurent at biblibre.com
Wed Dec 1 18:45:10 NZDT 2010


Le 29/11/2010 22:49, Chris Nighswonger a écrit :
> 2010/11/29 Paul <paul.a at aandc.org <mailto:paul.a at aandc.org>>
> 
>     First, are spaces allowed in the 10 character CCODE? Are there any
>     other restrictions (numerics, underlines, hyphens, etc)?  I find
>     nothing (easily) in the documentation. As a comparison, the LOC code
>     allows 80 characters including (at least) spaces.
> 
> 
> It appears that you can, at least, define a CCODE type with spaces.
> Whether it works in practice or not I don't know.
>  
> 
>     For various historical reasons we have nearly two hundred
>     "categories" spread across 468 spreadsheets - that would be a
>     possible 100,000 "simple search and replace" operations ;={  and
>     I've never had much success with Perl looking for entries in a
>     specific column of a spreadsheet where obviously the "category name"
>     could also appear in the title, keywords and reviews which we
>     obviously do not want to modify.
> 
> 
> We use Text::CSV in a number of places in Koha to work with comma
> delimited files, and it works very nicely. I don't see why you should
> have any problem munging up 468 spreadsheets using that module. But
> then, maybe I'm being naive here. :-)
Or SpreadSheet::ParseExcel
Or DBD::Excel
Or even use Excel formulas...
depending on how efficient you are in either of the languages and the
time you may have to spend on that.

>  
> 
>     So I'll probably end up attempting to modify the SQL parameter for
>     field length (a task which, from past experience with Oracle, I am
>     not looking forward to.)
> 
> 
> This will probably break things at worst and at best is ill advised. It
> will definitely result in complications during future upgrades should
> the core code change in the future.
This would also be my advice too.
Problem is that ccode ans its length is used in many tables (circulation
rules for instance.)
So I would not go that way.
-- 
Henri-Damien LAURENT


More information about the Koha mailing list