August 04, 2009

How To Create Scheduled Tasks To Load Browser

You can create a scheduled tasks by scheduling your task to run in an interval repeatedly. To schedule a new task:
  1. Click on Start menu, go to Control panel and choose Scheduled Tasks
  2. Double-click Add Scheduled Task to start the Scheduled Task Wizard, and then click Next in the dialog box
  3. Click Browse, choose the program/file that you want to schedule
  4. Assign a name for the task, and then choose one of the following options:
    • Daily
    • Weekly
    • Monthly
    • One time only
    • When my computer starts
    • When I log on

  5. Specify the day and time to run the task, and then click Next
  6. Type the name and password of the user who is associated with this task
  7. Click Next, and then click Finish after you verify the choices that you have made

To schedule a task for browser to open a webpage, the Run field should looks like “C:\Program Files\Internet Explorer\iexplore.exe” http:\\www.website_name.com\file_name.aspx

By default, iexplore.exe will open a browser every time it runs. So, in order to close the browser, you may have to create another schedule task.

Below is the steps to close the browser:
  1. 1. Create a Notepad, type taskkill /IM iexplore.exe inside Notepad and then save the file as file_name.bat
  2. Create a new schedule task, browse the file file_name.bat
  3. Schedule this task to run 5 or 10 minutes after the first schedule task.

May 19, 2009

Excel Shortcut Key

Task Pane
F1- display the Help task pane
CTRL + F1- open or close the current task pane
 
Workbook Window
CTRL + F4- close the selected workbook window
CTRL + F5- restore the window size of the selected workbook window
CTRL + F6- switch to next workbook window when more than one workbook window is open
- When the task pane is visible, the next workbook will include that pane when switching between panes
CTRL + F7- move the workbook window when it is not maximized
- use ARROW keys to move the window
- press ESC key when finished
CTRL + F8- resize the workbook window by ARROW keys when it is not maximized
CTRL + F9- minimize a workbook window to an icon
CTRL + F10- maximize or restore the selected workbook window
 
Worksheets
ALT + SHIFT + F1
SHIFT + F11
- insert a new worksheet
 
Cells
F2- edit the active cell
- point the cursor at the end of the cell contents
SHIFT + F2- create or edit a cell comment
F8- select multiple cells by ARROW keys
 
Dialog Box
SHIFT + F3- display the Insert Function dialog box
F5- display the Go To dialog box
F7- display the Spelling dialog box to check spelling in the active worksheet or selected cells
ALT + F8- display the Macro dialog box to run, edit, or delete a macro
ALT + F11- open the Visual Basic Editor which you can create a macro by using Visual Basic for Applications (VBA)
ALT + SHIFT + F11- open the Microsoft Script Editor, where you can add text, edit HTML tags, and modify any script code
F12- display the Save As dialog box
 
Menu
F10- select the toolbar
- close an open menu and submenu at the same time
SHIFT + F10- display the shortcut menu for a selected cell
 
Chart
ALT + F1
F11
- create a chart for the selected cells
 
Split Window
F6- switch to next pane in a worksheet that has been split (Window > Split command)
SHIFT + F6- switch to previous pane in a worksheet that has been split

May 13, 2009

SQL Basic Syntax

Select Statement
It is used to retrieve a set of data from a database.
SELECT column_name
FROM table_name

Select Distinct Statement
It is used to retrieve a set of data from a database without contains duplicate values.
SELECT DISTINCT column_name
FROM table_name

Where Clause
It is used to extract only those records that fulfill a specified criterion. It could not be used with aggregate functions.
SELECT column_name
FROM table_name
WHERE expression

Order By Keyword
It is used to sort the result-set by a specified column in ascending(ASC) order or descending(DESC) order.
SELECT column_name
FROM table_name
WHERE expression
ORDER BY column_name ASC

Group By Clause
It is used in conjunction with the aggregate functions to group the result-set by one or more columns.
SELECT column_name, aggregate_function(column_name)
FROM table_name
WHERE expression
GROUP BY column_name

Having Clause
It is used with aggregate functions.
SELECT column_name, aggregate_function(column_name)
FROM table_name
GROUP BY column_name
HAVING aggregate_function(column_name) operator value
Example:
SELECT column_name1,SUM(column_name2)
FROM table_name
WHERE expression
GROUP BY column_name1
HAVING SUM(column_name2)< 2000

May 06, 2009

SQL Functions

COUNT() - returns the number of rows of the specified column.
SELECT COUNT(column_name)
FROM table_name
WHERE expression
SELECT COUNT(DISTINCT column_name)
FROM table_name
WHERE expression

AVG() - returns the average value of a numeric column.
SUM() - returns the sum of a specific column.
MAX() - returns the largest value of a specific column.
MIN() - returns the smallest value of a specific column.
FIRST() - returns the first value of a specific column.
LAST() - returns the last value of a specific column.
Example:
SELECT AVG(column_name)
FROM table_name
WHERE expression

MID()
- Extract characters from a text field.
- start_position: the default starting position is 1.
- length: the number of characters to return (optional)
SELECT MID(column_name, start_position, length)
FROM table_name

UCASE() - converts a value to upper case.
LCASE() - converts a value to lower case.
LEN() - returns the length of a text field.
Example:
SELECT UCASE(column_name)
FROM table_name

ROUND()
- Rounds a numeric field to the number of decimals specified.
- decimal: specifies the number of decimals to be returned.
SELECT ROUND(column_name, decimal)
FROM table_name

FORMAT()
- formats how a field is to be displayed.
- format: specifies the format.
SELECT FORMAT(column_name, format)
FROM table_name
Example:
SELECT FORMAT(column_name, 'YYYY-MM-DD') AS New_Date
FROM table_name

SQL Basic Syntax

Create Statement
It is used to create a new database.
CREATE DATABASE database_name
It is used to create a new table.
CREATE TABLE table_name (column_name1 data_type1 NULL|NOT NULL, column_name2 data_type2 NULL|NOT NULL)
It is used to create a new column in a table.
ALTER TABLE table_name
ADD column_name data_type NULL|NOT NULL

Drop Statement
It is used to delete an existing database.
DROP DATABASE database_name
It is used to delete an existing table.
DROP TABLE table_name
It is used to delete an existing column in a table.
ALTER TABLE table_name
DROP COLUMN column_name

Rename Statement
It is used to rename an existing table.
sp_rename existing_table_name, new_table_name
It is used to rename an existing column.
sp_rename existing_column_name, new_column_name, 'COLUMN'

Insert Statement
It is used to insert a new row of data to a table.
INSERT INTO table_name (column_name1, column_name2)
VALUES (value1, value2)
It allows to insert multiple rows into a table. You can retrieve the data from another table and insert it into a new table.
INSERT INTO table_name1 (column_name1, column_name2)
SELECT column_name3, column_name4 FROM table_name2

Update Statement
It is used to update an existing record in a table.
UPDATE table_name
SET column_name1 = value1, column_name2 = value2
WHERE expression

Delete Statement
It is used to delete rows in a table.
DELETE FROM table_name
WHERE expression