Archive

Archive for April, 2009

Copy two tables in MsSql

April 27, 2009 ppshein Leave a comment

Do you know how to copy two tables in mssql 2000? It’s quite simple.

SELECT *
INTO master.dbo.micro_blog
FROM master.dbo.micro_blog

Categories: MSSQL Tags: , ,

Limit tag in MsSQL 2005

April 23, 2009 ppshein Leave a comment

Hope everybody knows about limit tag MsSql 2005. I feel that’s cool and can reduce the load of SQL query just like mySQL. It’s kinda simple to use this tag.

SELECT * FROM myTable limit 1,10

If we write so, the sql will return starting from the first record, and plus 10 record in the recordset of myTable.

SELECT * FROM myTable limit 20,40

If we write so, the sql will return starting from the 20th and plus 10 record of myTable. How.? It’s easy, isn’t it?

Categories: MSSQL Tags: , ,

How to export data as Excel format in Cold Fusion

April 22, 2009 ppshein Leave a comment

I’m trying to export all of data in my table in excel format by using Cold Fusion. I thought it would be complicated and hard to implement. After reading through Cold Fusion documents, it’s as easy as ABC. Here is sample coding :

<cfheader name=”Content-Disposition” value=”inline; filename=GiftLists.xls”>
<cfcontent type=”application/vnd.msexcel”>

<cfquery name=”PMQry” datasource=”#application.ds#” username=”#application.un#” password=”#application.pw#”>
SELECT P_Name, Org_Name FROM Persons
LEFT JOIN Organizations ON Org_ID = P_Organization
</cfquery>

<table border=”2″>
<tr>
<th>No.</th>
<th>Name</th>
<th>Organi</th>
</tr>
<cfoutput query=”PMQry”>
<tr>
<td>#currentrow#.</td>
<td>#P_Name#</td>
<td>#Org_Name#</td>
</tr>
</cfoutput>
</table>

How? It’s kinda easy, isn’t it?

Categories: coldfusion

jQuery

April 6, 2009 ppshein Leave a comment

I start learning jQuery which is kinda popular among Web Developer, cos of which is easy to implement, less of coding and more secure than ordinary javascript. But, the style of programming, it’s always updated by programmers and you gotta catch which has been changed in it.

If you wanna learn more, http://docs.jquery.com.

Planet Thingyan

April 1, 2009 ppshein Leave a comment

I’ve recently created Thingyan 2009 at Planet Website. It’s just featured page as Planet Style.

Thingyan

Categories: Informations Tags: ,