You are here: Re: select distinct record only if certain column not null « MsSQL Server « IT news, forums, messages
Re: select distinct record only if certain column not null

Posted by plaster1 on 04/10/07 16:09

On Apr 9, 4:59 pm, Erland Sommarskog <esq...@sommarskog.se> wrote:
> (plast...@gmail.com) writes:
> > Thanks Ed. Although i'm getting syntax issues with the UNION portion
> > of you query. Perhaps that's a version issue as well (i'm using SQL
> > server 7.0).
>
> A common recommendation is that you post:
>
> o CREATE TABLE statements for your tables.
> o INSERT statements with sample data.
> o The desired output given the sample.
>
> This makes it easy to copy and paste to develop a tested solution. Without
> that, you get more or less guessworks.
>
> Ed's query should be OK in SQL 7, but 1) I don't know how you adapted it
> to your problem 2) what error message you got.
>
> --
> Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se
>
> Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
> Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

You're right Erland, Ed's UNION query did the trick after a slight
amount of tweeking. I'll definitely use your advice as well when
posting to the groups. Thanks to you both for your time!

-B

 

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

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