You are here: Re: Stored procedure returns duplicates « MsSQL Server « IT news, forums, messages
Re: Stored procedure returns duplicates

Posted by Hugo Kornelis on 04/11/07 22:44

On 9 Apr 2007 15:42:24 -0700, yin_n_yang74@yahoo.com wrote:

>I am trying to create a report in Crystal Reports (v 8.5). I have a
>stored procedure to pull data from two databases and parameters.
>There are multiple one-to-many relationships and the stored procedure
>returns duplicates; e.g., one schedule may have multiple resources,
>supplies, and/or orders (and one order may have multiple foods). Is
>there a way to stop the duplication?
(snip)

Hi yin_n_yang74,

The first time you posted this question, I advised you to find a client
side solution and provided an outline of the algorithm to use. I also
pointed you to my bog entry that details a possible way to solve this
server-side, in case a client-side solution is not possible.

You now reposted the problem, with more detail, but my answer remains
the same. Either have Crystal Reports open three datasets and process
data from all of them at the same time, pairing data from the datasets
to form formatted output lines - or read my blog article at
http://sqlblog.com/blogs/hugo_kornelis/archive/2006/07/14/relating-unrelated-rows.aspx
if you really prefer a server-side solution and don't mind the
performance hit this will incur.

--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis

 

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

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