JOEL LIPMAN Systems / Automation / AI

Knowledge base / Since 1999

Scripts, systems & field notes.

Practical solutions and technical notes from CRM platforms, workflow automation, APIs, databases and the systems around them.

Advanced search

342 entries / matching Data

Clear filters
Connect to Joomla database in standalone script
Joomla

Connect to Joomla database in standalone script

APPLIES TO Joomla 2.5.x Why? I'm building a Joomla component which is to be compatible with Joomla versions 1.6.x to 2.5.x. Because I use dynamic scripts running in the background (mootools), some of these need to connect to the database but as they sit outside of the MVC structure, we need them to use the existing con...

Read note 61,413 hits
Copy a table with structure and data into a temporary table
Transact-SQL

Copy a table with structure and data into a temporary table

This will copy a given table into a temporary table all the while maintaining the structure and data. Thinking inside of the box I think everyone suggests the following (or at least the idea of): SELECT * INTO #MyTempTable FROM @GivenTable If @GivenTable is a parameter then the above will simply return an error. Also...

Read note 35,813 hits
Drop If Object Exists
Transact-SQL

Drop If Object Exists

Some people have been suggesting you can use "CREATE OR REPLACE ... VIEW ... FUNCTION" but my SQL Server 2008 Management Studio doesn't like this and refuses to understand what I'm trying to do.

Read note 32,733 hits
DataJumble - Shuffling characters in a data value
Transact-SQL

DataJumble - Shuffling characters in a data value

This was called a Data-Scrambling Function but it depends on what you mean by "scrambling". This is a function which merely uses the same characters but switches their order randomly, so I've renamed it DataJumble as opposed to my article on Data-Scrambling. Why? We want to scramble sensitive data that we send to suppl...

Read note 44,131 hits
Select unique values in Microsoft Excel column
Excel

Select unique values in Microsoft Excel column

Thought I'd put a quick note here, I tried a fair few solutions that didn't work and then found this hidden away in a forum: Quick Count =INT(SUMPRODUCT((A3:A1000<>"")/COUNTIF(A3:A1000,A3:A1000&""))) This returns the number of unique values in the range A3 to A1000 and excludes the blank/empty cells. Display all Unique...

Read note 21,279 hits
Migrate JComments from Joomla 1.5.x to Joomla 2.5.x
Joomla

Migrate JComments from Joomla 1.5.x to Joomla 2.5.x

Thought I'd add the migration script I've been using to test my JComments migration from my Joomla CMS site version 1.5.20 to Joomla CMS site version 2.5.6. DISCLAIMER I do not work for either Joomla or JoomlaTune (Jcomments) This script is provided as is without warranty If you do not understand what this script is do...

Read note 295,708 hits
MySQL: Display Users and Duration in Matrix Timesheet
MySQL

MySQL: Display Users and Duration in Matrix Timesheet

Given Data Activities by employees with start dates and end dates in a mySQL database. Objective User Mon Tue Wed Thu Fri Sat Sun Total --------------- ------- ------- ------- ------- ------- ------- ------- --------- Me 09:00 07:30 08:00 07:00 06:00 00:00 02:00 36:00 Myself 07:30 07:30 07:30 07:30 07:00 00:00 00:00 37...

Read note 37,573 hits
MySQL day of week ending on Friday
MySQL

MySQL day of week ending on Friday

Week Ending Date has been requested a lot more frequently now. It's an odd one but the example below shows how to do this for when the week ends on Friday. Assuming it starts on the previous Saturday.

Read note 26,913 hits
No rows returned in Oracle causes SP to fail
Oracle PL/SQL

No rows returned in Oracle causes SP to fail

The problem is that if the student does not have a username but has an ID number, then the first query returns NO ROWS and then the second query errors and the whole stored procedure fails. The same problem happens when using these as a subquery which has an empty result set. Furthermore I am using this stored procedur...

Read note 41,838 hits

Working principle

Our Purpose

This site exists as a practical knowledge base built from real-world experience across systems, platforms, and technologies since 1999. Much of the content documents solutions, edge cases, and working patterns that were learned through investigation where documentation was incomplete or absent, and is shared to reduce the same friction for others.

27 Years in IT
1021 CRM clients
816 Site articles
30.0m+ Reads / hits

Knowledge base

Search notes

Find matching words in article titles and content.