Copy two tables in MsSql
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
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
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?
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?
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.
I’ve recently created Thingyan 2009 at Planet Website. It’s just featured page as Planet Style.
