Reply to Re: Replacing SELECT with a value in an OUTER JOIN

Your name:

Reply:


Posted by Simon Hayes on 09/06/05 14:59

I'm not sure I totally understand, but perhaps something like this
might work:

INSERT INTO dbo.Words (Word, SomeNumber)
SELECT 'bounded', 1
where not exists (
select *
from dbo.GenericStopWords
where Word = 'bounded'
)

Or equivalently:

if not exists (
select *
from dbo.GenericStopWords
where Word = 'bounded'
)
INSERT INTO dbo.Words (Word, SomeNumber)
SELECT 'bounded', 1


You might want to consider putting this into a stored proc which takes
your word as a parameter - that's generally a better practice then
embedding all your SQL statements in the front end.

If this doesn't help, I suggest you post sample CREATE TABLE and INSERT
statements to provide a test case which others can copy and paste into
QA.

Simon

[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

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