gregs

helping me remember what I figure out

August 29, 2007
by gregs
0 comments

SQL to XML

Just came across this neat trick that uses SQL to generate XML on the fly: PLAIN TEXT CODE: DECLARE @x xml SET @x=(select geoAreaCode , geoLevelCode , geoLevelId , geoAreaId from tbl_geoLevel where uuid = for xml raw('geoArea'), root('geoAreas'), type) … Continue reading

November 23, 2006
by gregs
0 comments

LogParser

Charlie Arehart has a handy little article published in this months CFDJ on using Microsoft's Log Parser tool, which allows you to write SQL like statements against your CFMX log files. Couldn't find a publicly accessible link, but if you … Continue reading

June 29, 2006
by gregs
0 comments

AUTO INCREMENT

Since the MySQL Query Browser on my Mac refused to let me set a field as auto increment through the GUI, here's how you can using SQL change an existing column to use auto_increment: PLAIN TEXT SQL: ALTER TABLE `aggregatedWeekly` … Continue reading

October 21, 2005
by gregs
0 comments

LIKE and Oracle

I never spotted this before but the LIKE operator is case sensitive! Which was skewing my search results quite severely. The work around is to put everything into upper case, both the values in the column you are performing the … Continue reading

October 20, 2003
by gregs
0 comments

Updates from a select

I have been doing a lot more database based work recently and have learned one or two pretty useful techniques. Here is an extremely useful one: Running an update based on a select statement. In the past whenever I could … Continue reading