Re: [sqlite] TRIM Function in Python3's sqlite3 import
David - thanks for the pointer to when TRIM showed up. Python is 10 years out of date!! Wow!! Upgrade was not super difficult, I kind of figured it out with a lot of searching for answers. Searching about upgrades, I found this listing: https://www.reddit.com/r/Python/comments/3docsa/how_do_i_upgrade_the_sqlite_lib_in_python34/ It pointed me in a direction which worked on Ubuntu 17.10 and Fedora Server 27. I actually am running RHEL 5, but wanted to test the upgrade before getting back to the office. I figured Fedora Server was 'close' to RHEL. I'm using a python installed without root (setting the ./configure --prefix=). So when I saw the download options for SQLite3, I picked the one with configure and tried the same --prefix option. After make install, I had the so libraries. I got the new libraries to be used by setting the LD_LIBRARY_PATH to a value of the sqlite3-321/lib. All the python modules showed sqlite3.sqlite_version of 3.20.1 when I don't have the LD_LIBRARY_PATH set, and 3.21.00 when I do. Thanks again, Merry Christmas!! Date: Fri, 22 Dec 2017 15:39:38 + From: David Raymond To: SQLite mailing list Subject: Re: [sqlite] TRIM Function in Python3's sqlite3 import Message-ID: < he1pr0701mb1931ec66b2de2686d238831787...@he1pr0701mb1931.eurprd07.prod.outlook.com > Content-Type: text/plain; charset="utf-8" http://www.sqlite.org/changes.html Looks like trim was added in 10 years ago in 3.4.0 (2007-06-18) Can't help you with the Linux side of things, sorry. -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Ed Lipson --cut-- Thanks, Ed ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] TRIM Function in Python3's sqlite3 import
I shifting some Python code to Linux from Windows. I find that TRIN i smissing from the verison on Linux. Python reports this version information sqlite.version 2.6.0 for both Windows and Linux sqlite.sqlite_version 3.3.6 for Linux, 3.15.2 for Windows. Two questions: 1. When was TRIM added as a function? 2. How do I update the RHEL Python to a version which has the TRIM function, or is there a replacement function available in 3.3.6 to which I can change the code? Thanks, Ed ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Date Formatting from Excel Float Date/Time Representation
I'm trying to work with JIRA information. I export my JIRA records and load them into a SQLite3 database via a python script. The export is in Excel format. When I send the data back from SQLite3 to Excel and have Excel format the date, it is correctly interpreted. From that I am assuming I have a 'proper' process of reading the Excel and writing the Excel, with SQLite3 as the middle. How would I format the data in a SQL statement so it looks correct? When I run: select t0.key, "Issue Type", Updated from JIRA_Stat_0_20170106124800 t0 inner join JIRA_Stat_1_20170106124800 t1 on t0.key = t1.key where "Last Comment" is not null order by assignee I get output which looks like: key Issue Type Updated TSGOPM-176 Task 42674.629861 TSGOPM-139 Task 42698.225695 The Updated column is properly reflected as a float, as that is the internal Excel format. What formatting functions can I use to get it to appear as a date time in SQL output, as it appears in Excel? I have tried strftime and date but I don't get any meaningful data. Thanks, Ed ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users