<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/sql</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Mon, 13 Feb 2012 15:53:36 GMT</pubDate>
<item>
<title>(SQL) Manual activation of a module in Joomla! - iroybot</title>
<link>http://snipplr.com/view/63229/manual-activation-of-a-module-in-joomla/</link>
<description><![CDATA[ <p>in order to avoid the .zip madness when creating a new module, you can make it available in the backend by firing a simple SQL in your DB. (mod_media is the name of the folder that holds it)</p> ]]></description>
<pubDate>Fri, 10 Feb 2012 11:42:10 GMT</pubDate>
<guid>http://snipplr.com/view/63229/manual-activation-of-a-module-in-joomla/</guid>
</item>
<item>
<title>(SQL) Query to find Parameters and Value Sets associated with a Concurrent Program - theonlyalterego</title>
<link>http://snipplr.com/view/62693/query-to-find-parameters-and-value-sets-associated-with-a-concurrent-program/</link>
<description><![CDATA[ <p>This query will retrieve a list of the parameters and value sets based on a provided concurrent program user name</p> ]]></description>
<pubDate>Sat, 21 Jan 2012 07:38:14 GMT</pubDate>
<guid>http://snipplr.com/view/62693/query-to-find-parameters-and-value-sets-associated-with-a-concurrent-program/</guid>
</item>
<item>
<title>(SQL) Sql Date Difference - jsturtevant</title>
<link>http://snipplr.com/view/62372/sql-date-difference/</link>
<description><![CDATA[ <p>Can use second, Minute and many other from the url above</p> ]]></description>
<pubDate>Sat, 07 Jan 2012 01:29:19 GMT</pubDate>
<guid>http://snipplr.com/view/62372/sql-date-difference/</guid>
</item>
<item>
<title>(SQL) Where clause to select multiple rows of unique values - the_construct</title>
<link>http://snipplr.com/view/62323/where-clause-to-select-multiple-rows-of-unique-values/</link>
<description><![CDATA[ <p>Where clause to select multiple rows of unique values</p> ]]></description>
<pubDate>Thu, 05 Jan 2012 21:42:32 GMT</pubDate>
<guid>http://snipplr.com/view/62323/where-clause-to-select-multiple-rows-of-unique-values/</guid>
</item>
<item>
<title>(Django) Clean up expired django.contrib.session\'s in a huge MySQL InnoDB table - magicrebirth</title>
<link>http://snipplr.com/view/62190/clean-up-expired-djangocontribsessions-in-a-huge-mysql-innodb-table/</link>
<description><![CDATA[ <p>While django provides the django_admin.py cleanup script, if sessions get out of control sometimes you have to go lower level to get everything cleaned up. If the problem gets out of hand and you hit the resource limits of the machine, it is very difficult to get anything done in the database.

Attached is SQL code which was used to cleanup 27GB of expired session data in 3h. Run it like this to make sure it runs to completion:

`nohup mysql --user=username --password=password --host=hostname database < delete_expired_sessions.sql`

nohup causes the script to run detached from a terminal, so if your session gets disconnected it will keep running.

p.s.
An alternative approach is to launch this command from the shell:

DELETE FROM django_session WHERE expire_date < NOW();

or 

DELETE FROM django_session WHERE expire_date < "2011-12-10 00:00:00";</p> ]]></description>
<pubDate>Fri, 30 Dec 2011 23:12:12 GMT</pubDate>
<guid>http://snipplr.com/view/62190/clean-up-expired-djangocontribsessions-in-a-huge-mysql-innodb-table/</guid>
</item>
<item>
<title>(SQL) Oracle SQL - get a list of most recent user logins - theonlyalterego</title>
<link>http://snipplr.com/view/62101/oracle-sql--get-a-list-of-most-recent-user-logins/</link>
<description><![CDATA[ <p>Query to find the most recent logins for a particular user ( find 1 years worth )</p> ]]></description>
<pubDate>Fri, 23 Dec 2011 05:53:20 GMT</pubDate>
<guid>http://snipplr.com/view/62101/oracle-sql--get-a-list-of-most-recent-user-logins/</guid>
</item>
<item>
<title>(Other) insert into (backup table) - BrentS</title>
<link>http://snipplr.com/view/61999/insert-into-backup-table/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 20 Dec 2011 04:55:02 GMT</pubDate>
<guid>http://snipplr.com/view/61999/insert-into-backup-table/</guid>
</item>
<item>
<title>(SQL) Auto Incremementing Id for Insert in T-SQL table - ezerick</title>
<link>http://snipplr.com/view/61997/auto-incremementing-id-for-insert-in-tsql-table/</link>
<description><![CDATA[ <p>This code allows you to create an ID field value for inserts into a table that does not auto increment itself</p> ]]></description>
<pubDate>Tue, 20 Dec 2011 04:28:54 GMT</pubDate>
<guid>http://snipplr.com/view/61997/auto-incremementing-id-for-insert-in-tsql-table/</guid>
</item>
<item>
<title>(SQL) Find duplicate entries - Neven</title>
<link>http://snipplr.com/view/60808/find-duplicate-entries/</link>
<description><![CDATA[ <p>Searches for duplicate entries in the DataBase table</p> ]]></description>
<pubDate>Mon, 14 Nov 2011 23:07:17 GMT</pubDate>
<guid>http://snipplr.com/view/60808/find-duplicate-entries/</guid>
</item>
<item>
<title>(SQL) Convert integer to date using SQL in iSeries DB2 - wnasich</title>
<link>http://snipplr.com/view/60737/convert-integer-to-date-using-sql-in-iseries-db2/</link>
<description><![CDATA[ <p>intfield has this format: YYYYMMDD</p> ]]></description>
<pubDate>Sat, 12 Nov 2011 02:21:22 GMT</pubDate>
<guid>http://snipplr.com/view/60737/convert-integer-to-date-using-sql-in-iseries-db2/</guid>
</item>
<item>
<title>(SQL) Find rows with last date of month - danfsmith</title>
<link>http://snipplr.com/view/60640/find-rows-with-last-date-of-month/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 09 Nov 2011 01:27:51 GMT</pubDate>
<guid>http://snipplr.com/view/60640/find-rows-with-last-date-of-month/</guid>
</item>
<item>
<title>(SQL) TSQL COVERING INDEX - amos24c</title>
<link>http://snipplr.com/view/60399/tsql-covering-index/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 01 Nov 2011 10:54:41 GMT</pubDate>
<guid>http://snipplr.com/view/60399/tsql-covering-index/</guid>
</item>
<item>
<title>(SQL) Oracle - Find which users have FND Diagnostic profile value set - theonlyalterego</title>
<link>http://snipplr.com/view/60195/oracle--find-which-users-have-fnd-diagnostic-profile-value-set/</link>
<description><![CDATA[ <p>A slight adaptation on the sql in the Oracle Forum</p> ]]></description>
<pubDate>Wed, 26 Oct 2011 06:40:55 GMT</pubDate>
<guid>http://snipplr.com/view/60195/oracle--find-which-users-have-fnd-diagnostic-profile-value-set/</guid>
</item>
<item>
<title>(MySQL) US &amp;amp; CANADA Cities Database - frederichoule</title>
<link>http://snipplr.com/view/60075/us--canada-cities-database/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 22 Oct 2011 12:36:31 GMT</pubDate>
<guid>http://snipplr.com/view/60075/us--canada-cities-database/</guid>
</item>
<item>
<title>(PHP) Codeigniter: show SQL query from Active Record - telltec</title>
<link>http://snipplr.com/view/59780/codeigniter-show-sql-query-from-active-record/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 15 Oct 2011 01:00:48 GMT</pubDate>
<guid>http://snipplr.com/view/59780/codeigniter-show-sql-query-from-active-record/</guid>
</item>
<item>
<title>(SQL) Connect string for Oracle with sqlplus - blackthorne</title>
<link>http://snipplr.com/view/59611/connect-string-for-oracle-with-sqlplus/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 11 Oct 2011 01:26:15 GMT</pubDate>
<guid>http://snipplr.com/view/59611/connect-string-for-oracle-with-sqlplus/</guid>
</item>
<item>
<title>(PHP) Database php class - claudiowebdesign</title>
<link>http://snipplr.com/view/59434/database-php-class/</link>
<description><![CDATA[ <p>That's something quick. A basic php class to manage properly a database. Thanks to magic methods opening a database is almost automatic.</p> ]]></description>
<pubDate>Wed, 05 Oct 2011 09:31:06 GMT</pubDate>
<guid>http://snipplr.com/view/59434/database-php-class/</guid>
</item>
<item>
<title>(SQL) Sintaxis básica/habitual SQL para consulta tipo DELETE - alberomo</title>
<link>http://snipplr.com/view/58685/sintaxis-bsicahabitual-sql-para-consulta-tipo-delete/</link>
<description><![CDATA[ <p>Sintáxis y clausulas más habituales para consulas SQL con cláusula DELETE que elimina uno o varios registros de la tabla que se especifica.</p> ]]></description>
<pubDate>Thu, 15 Sep 2011 00:58:28 GMT</pubDate>
<guid>http://snipplr.com/view/58685/sintaxis-bsicahabitual-sql-para-consulta-tipo-delete/</guid>
</item>
<item>
<title>(SQL) Sintaxis básica/habitual SQL para consulta tipo UPDATE - alberomo</title>
<link>http://snipplr.com/view/58684/sintaxis-bsicahabitual-sql-para-consulta-tipo-update/</link>
<description><![CDATA[ <p>Sintáxis y clausulas más habituales para consulas SQL con cláusula UPDATE que actualiza/modifica uno o varios registros de la tabla que se especifica.</p> ]]></description>
<pubDate>Thu, 15 Sep 2011 00:54:46 GMT</pubDate>
<guid>http://snipplr.com/view/58684/sintaxis-bsicahabitual-sql-para-consulta-tipo-update/</guid>
</item>
<item>
<title>(SQL) Sintaxis básica/habitual SQL para consulta tipo INSERT INTO - alberomo</title>
<link>http://snipplr.com/view/58682/sintaxis-bsicahabitual-sql-para-consulta-tipo-insert-into/</link>
<description><![CDATA[ <p>Sintáxis y clausulas más habituales para consulas SQL con cláusula INSERT INTO que añade un nuevo registro a la tabla que se especifica.</p> ]]></description>
<pubDate>Thu, 15 Sep 2011 00:41:05 GMT</pubDate>
<guid>http://snipplr.com/view/58682/sintaxis-bsicahabitual-sql-para-consulta-tipo-insert-into/</guid>
</item>
</channel>
</rss>
