NOTE TO SELF:
Until you find a better way, here’s how you remove the X that closes a JQuery dialog box:
$( ‘a.ui-dialog-titlebar-close’ ).remove();
OR
Change the Style definition in the HEAD.
Posted by coreycoogan on January 31, 2011
NOTE TO SELF:
Until you find a better way, here’s how you remove the X that closes a JQuery dialog box:
$( ‘a.ui-dialog-titlebar-close’ ).remove();
OR
Change the Style definition in the HEAD.
Posted in jQuery | Tagged: dialog, jQuery UI | 2 Comments »
Posted by coreycoogan on January 27, 2011
Over the course of my career, I have frequently been given random excel spreadsheets that contain data that needs to be either inserted or updated to a database. There are many routes one can go with this task, most of which are more complicated then necessary. I find the simplest solution is to use Excel formulas to generate my SQL statements for me.
With the cursor on the cell with the formula, Excel outlines the cell with a tiny square on the bottom right corner. Double click on that tiny square and your formula is repeated all the way to where the data ends next to it.
(Thanks to Todd Boehm for posting this to the comments)
The formula will now be copied to each row.
Given the following spreadsheet for some customers, I will show a simple formula to do an insert into the customer table.
| A | B | C | D | |
| 1 | NAME | PHONE | SIGNUP_DATE | |
| 2 | Joe Smith | (920) 555-1112 | 5/21/2010 | = “insert into CUSTOMER (name,phone,signupDate) values (‘” & A2 & “‘, ‘” & B2 & “‘, ‘” & TEXT(C2,”M/dd/yyyy”) & “‘)” |
Notice the use of the TEXT function against the value for SIGNUP_DATE. This is necessary with dates because Excel will spit that value out in a serial format, which isn’t what we want in our database. Use the TEXT function to convert the Excel Date to text for the insert.
Posted in Business, Database, Helpful Tips | Tagged: Data Entry, Date to Text, Excel, Insert into Database | 1 Comment »