Apr
25
2006
0

Font Matching Tool

I had to match a font from a letterhead today and I came across a couple of great tools for the task.

First I found FontMatcher, a VB6 program that takes a BMP image and matches it to your TTF files. The catch is that you have to have the font already for it to find it. I didn’t so it didn’t match my font.

I finally found a great tool that searches their own online font database: What the Font. It even allows you to purchase the font after it finds it for you ;) . Saved me a lot of time though – it’s worth it.

Written by Tom in: Random |
Apr
18
2006
0

MSSQL to MDB

It’s fairly easy to take an MDB database and convert it to SQL Server, but how about taking an SQL Server database and downloading it into an MDB file (Microsoft Access)?

This article has some code to do just that: http://www.codeproject.com/useritems/SQL_to_Access_Data_Export.asp

Written by Tom in: SQL Server |
Apr
04
2006
12

Javascript String to Int

Handy function:

var yourInt;
yourInt = parseInt(str);

More Info: http://www.devguru.com/Technologies/ecmascript/quickref/parseint.html

Written by Tom in: Javascript |
Apr
03
2006
--

Update using an inner join (MSSQL)

Just searched the net trying to figure out how to do an update using an inner join. I figured it was possible, and I was right. Here’s how to do it:

UPDATE Table1
SET Table1.Title = Table2.Title
FROM Table1, Table2
where Table1.ID = Table2.ID

If you are using aliases – for instance if you are updating a table you are joining to itself, use this code:

UPDATE Table1Alias
SET Table1Alias.Title = Table2Alias.Title
FROM Table1 as Table1Alias, Table2 as Table2Alias
where Table1Alias.ID = Table2Alias.ID

Another scenario you may encounter is where you want to update a table, but use an inner join to further filter the rows you want to update.

Here’s an example of how to do this:

UPDATE Table1 Set Field1 = Value
FROM Table1 as t1
INNER JOIN Table2 as t2 on t1.Field2 = t2.Field2
WHERE Field3 = Value

That seems too simple, but it eluded me for a long time.

Written by Tom in: SQL Server |

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes