You are here: Re: stored procedure « MsSQL Server « IT news, forums, messages
Re: stored procedure

Posted by Eugene Anthony on 11/05/05 17:57

I done this:

SELECT c.Name, s.Name, t.TaxPerPlace, t.ParentTaxPerPlaceID, MoreRecords
= (SELECT COUNT(*) FROM #TempItems TI WHERE TI.TaxPerPlaceID >=
@LastRecord) FROM #TempItems t JOIN Countries c ON c.CountryID =
t.CountryID JOIN States s ON s.StateID = t.StateId WHERE TaxPerPlaceID >
@FirstRecord AND TaxPerPlaceID < @LastRecord ORDER BY t.TaxPerPlaceId


but a problem I encounter is

CountryID = 0
StateID = 0

when I dont select a countryID and StateID. 0 is not found in the
Countries and States table. This would mean c.Name ="N/A" and s.Name =
"N/A" if its value is 0. How is it done in my case.


Eugene Anthony

*** Sent via Developersdex http://www.developersdex.com ***

 

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

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