Reply to Re: this sql command make me sick

Your name:

Reply:


Posted by Hugo Kornelis on 06/01/06 23:14

On 1 Jun 2006 15:54:27 -0700, enzo wrote:

(snip)
>i thing that i must to be a simple LEFT JOIN but it doesn't work in
>Access (i have a web asp page with and access database in this case)...

Hi enzo,

You have asked your question in a SQL Server group. Since you are using
Access, maybe you should try an Access group instead?

>ps/.. my left join code:
>SELECT table1.name, table2.date, table2.amount
>FROM table1 LEFT JOIN table2 ON table1.code = table2.code
>WHERE (((table1.departm)=53) AND ((table2.date)=#2/15/2006#));

For SQL Server, you'd have to change the format for the date constant.
And for each database that supports LEFT JOIN, you'd have to move the
filtering condition for table2.date.

In SQL Server syntax:

SELECT t1.name, t2.date, t2.amount
FROM table1 AS t1
LEFT JOIN table2 AS t2
ON t2.code = t1.code
AND t2.date = '20060215'
WHERE t1.departm = 53

--
Hugo Kornelis, SQL Server MVP

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация