Friday, January 25, 2013

Subquery needs to be aliased in T-SQL

This is not necessary in Oracle.

select decode(c1,'a','not null','null value')
from
(
select null c1 from dual
union
select 'a' from dual
)

In T-SQL, it should be aliased.

select c1
from
(
select null c1 from dual
union
select 'a' from dual
) a

Tuesday, January 15, 2013

Three Ways to Use CSS

1. External Style Sheet

Ideally applying to entire web site or at least multiple pages. It has to be imported by Link tag in the head section.

<.head>.
<.link rel="stylesheet" type="text/css" href="mystyle.css">.
<./head>.

2. Internal Style Sheet

Defined in head.

<.head>.
<.style>.
hr {color:sienna;}
<./style>.
<./head>

3. Inline Style

Use the style attribute for relevant tag.

<.p style="color:red;margin-left:20px;">.paragraph.<./p>.