Re: Problem using Convert on dates
Erland,
I had a brain spaz on that one. Sorry. But thanks for the reply.
lq
Erland Sommarskog <sommar@algonet .se> wrote in message news:<Xns947DF2 44CC05BYazorman @127.0.0.1>...[color=blue]
> Lauren Quantrell (laurenquantrel l@hotmail.com) writes:[color=green]
> > A question, I haven't used Union in SPs before. How can I do an ORDER
> > BY for the whole result. I have four select statements joined with the
> > unions.[/color]
>
> Here is an example:
>
> SELECT CompanyName
> FROM Northwind..Cust omers
> UNION
> SELECT ProductName
> FROM Northwind..Prod ucts
> ORDER BY CompanyName
>
> The ORDER BY clause comes after all SELECT statements, and you use
> the column names of the first SELECT. Of course, you can use column
> numbers, as suggested by Chuck.[/color]
Erland,
I had a brain spaz on that one. Sorry. But thanks for the reply.
lq
Erland Sommarskog <sommar@algonet .se> wrote in message news:<Xns947DF2 44CC05BYazorman @127.0.0.1>...[color=blue]
> Lauren Quantrell (laurenquantrel l@hotmail.com) writes:[color=green]
> > A question, I haven't used Union in SPs before. How can I do an ORDER
> > BY for the whole result. I have four select statements joined with the
> > unions.[/color]
>
> Here is an example:
>
> SELECT CompanyName
> FROM Northwind..Cust omers
> UNION
> SELECT ProductName
> FROM Northwind..Prod ucts
> ORDER BY CompanyName
>
> The ORDER BY clause comes after all SELECT statements, and you use
> the column names of the first SELECT. Of course, you can use column
> numbers, as suggested by Chuck.[/color]
Comment