You are here: Table variables « MsSQL Server « IT news, forums, messages
Table variables

Posted by Andrew Clark on 02/02/06 17:54

Hello,

I am writing a function that uses two table variables. The structures of
both are shown here:

DECLARE @workdates TABLE (
conflict CHAR(1),
workdate SMALLDATETIME
)

DECLARE @existing TABLE (
workdate SMALLDATETIME
)

I need to do an update on the first table:

UPDATE @workdates
SET conflict = 'X'
FROM @existing s
WHERE workdate = s.workdate

I am concerned that the unqualified 'workdate' in the WHERE clause will
give me an ambiguous column reference. Is this SQL statement valid?

Thanks,
Andrew

 

Navigation:

[Reply to this 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

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