-
Assign SELECT results into variables
I mentioned here that SELECT INTO in Sql Server is functionally similar to CREATE TABLE AS in Oracle. Oracle also has SELECT INTO, but it is used for assigning query results to a variable. Here is a PL/SQL code snippet: declare MyVariable varchar2(20); Begin select ColumnName into MyVariable from MyTable where MyID = SomeInteger; dbms_output.put_line(‘Hello…
-
Best way to represent date value in Sql Server
I am going through Kalen Delaney and Itzik Ben-Gan’s Inside Sql Server 2005 books. I am surprised and happy to learn that you can always represents date/time value in the format of [YY]YYMMDD[ HH:MI[:SS][.MMM]] in Sql Server, with things inside the square bracket being optional. In fact, that is a recommended practice because you will…
-
Computer fixed
Reader Bulent’s comment gave me some ideas. I unplugged the existing power cable from the hard disk, and plugged in another available power cable, to see if that would make any difference. It didn’t. Frustrated, I left the computer on and busied myself with other matters, probably doing dishes. When I came back, lo and…
-
Archiving old mail and mail attachment in SQL Server 2005
-
PC Help Needed