Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > Multiple SELECT statements - urgent
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 28th February 10:10
jenc
External User
 
Posts: 1
Default Multiple SELECT statements - urgent



Hi,

I was wondering if anyone could help me. I need to return
a number of results from a table that require me to use
many select statements. i.e.

select count(NoApples) from fruitTable
where NoApples = -1 and Cost = 5

select count(NoOranges) from fruitTable
where NoOranges = -1 and Cost = 5

etc.....

The reason why I want to do this is because I need to
populate a crystal report which has between 24 and 60
fields and I dont realy want to do 24 to 60 separate
stored procedures per report.

I was thinking of using a user defined function to return
a table of the results, but I am having problems using
many select statements.

Any help/suggestions appreciated.

Thanks in advance.

Jen
  Reply With Quote


  sponsored links


2 28th February 10:10
vishal parkar
External User
 
Posts: 1
Default Multiple SELECT statements - urgent



see reply in .programming

--
- Vishal
  Reply With Quote
3 28th February 10:11
t.s.ramesh
External User
 
Posts: 1
Default Multiple SELECT statements - urgent


I feel there is some thing wrong in your database Design
itself. Why there are columns like NoApples, NOOranges
etc... The Design should have been this way, Fruits, No.
Where in you can store Apples, Oranges etc.. under Fruits
column and Noapples, NoOranges under No. column.


return

return
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666