Archives
-
Split List Table-Valued Function Reviewed
In my previous post, I discussed the function used to split a string into a table of tokens. Very useful instead creating a cursor. Now, with SQL 2005/2008, it became easier and faster to do the same job using XML parsing. I found this function online, written by Jacob Sebastian which is much faster than my [...]
-
Microsoft SQL 2008 Books
For those who are jumping into MS SQL 2008, here are two goo books to purchase. The first one, Microsoft SQL Server 2008 Management and Administration, is a complete, fast-paced, task-based reference you’ve been searching for. Ross Mistry presents proven techniques for SQL Servere 2008 installation, upgrades, backup/restore, data transfer, indexing and much more. Another [...]
-
Dynamic Select and Order By Parameters Without Dynamic Query
Everybody knows that dynamic queries take a lot more of work and time to process. I had last week a case in which I had a variable number of parameters to pass to a stored procedure and one of the parameters was the “order by” clause. Also, I needed to do some pagination on my [...]
-
Query Sorted Results in HTML Table, Better Approach
I received a comment in my other article with the same title from Larry C. Lyons indicating me a better solution by Stuart Langridge making use of a Javascript library he wrote called sorttable.js, which sorts the HTML table by sortable headers, without having to send another request to the database. Very well done, congratulations Stuart.
Dec 24th, 2008 | Filed under Database, Javascript -
Be a Student of Your Craft
My reasoning behind the title of this blog entry is to discuss how to be confident in your skill set as an IT professional and to avoid that feeling of “Where am I going or am I doing the right thing with this solution?” Recently I was questioned by a team member on my approach [...]
Dec 10th, 2008 | Filed under ColdFusion, Database -
Upgrading from MSSQL-2000 to MSSQL-2005
Last Friday we upgraded our two database servers to MS SQL 2005. Our co-worker Matt Horrell found some scripts online that helped us a lot, like the one that reads all the users and generates another script to create them back on the new server, and the other that reads all the linked servers and [...]
-
Split List Table-Valued Function
Continuing my previous blog about splitting a list to insert data into a table, we could transform the stored procedure into a table-valued function that you can flaunt using your best hosting. Using the same example list as before, let’s create the function for this list <cfset addCartValues=”P555|2,P444|1,P333|2″ /> You may download the function here.
-
Looping Through a List Using T-SQL
Usually we have to loop through lists to insert or update data, and some of us choose to use ColdFusion tag CFLOOP with an inner query to do that job. That will cause several connections to the database (one for each member of the loop). One way to avoid that, other than create a huge [...]
-
SQL Injection Hack using CAST from 1.verynx.cn
I found some interesting articles about this hacker attack using SQL injection and I’m aggregating them here. I got this custom tag from “Por que CF” (Why CF) written by Pedro Claudio (CF-Brasil), and here is its usage: <cf_DisableSQLInjection> Block and log the results <cf_DisableSQLInjection mailto=“e-mail,e-mail,e-mail,e-mail”>Block, log and send e-mail <cf_DisableSQLInjection mailto=“e-mail,e-mail,e-mail,e-mail” mailfrom=“mail”>Block, log and [...]
-
Populating a Multi-Lingual Site from a Database
Professional web sites do not rely on Google Translator or other automated tools. Although we can have an idea of the translated subject, not always the translation is 100% accurate and could cause problems for the site owner. Nothing wrong with the client submitting the page to the translation tool, since it is his option [...]
jQuery_Mobile First Look