If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > Any alternative for INLINE SQL QUERY?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-25-05, 17:31
srinivas_vja srinivas_vja is offline
Registered User
 
Join Date: Jun 2004
Location: India
Posts: 15
Question Any alternative for INLINE SQL QUERY?

Hi

I need alternative solution to INLINE SQL query.

eg.1:
Quote:
select d.deptid, d.deptname,
( select count(empid) from emp e where e.deptid=d.deptid )
from dept d
eg.2:
Quote:
select dept, count(*)
from
(
select dept,1 as cnt
from testtable
group by req,seq,item, dept
) XX
group by dept
The solution can be a nested query or any other alternative preferably without cursors.

TIA
Srinivas
Reply With Quote
  #2 (permalink)  
Old 01-25-05, 18:24
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,613
Why do you need it? If we don't understand what you are trying to do or avoid, odds are good that we'll give you a useless answer.

-PatP
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On