Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 support

Author  Topic 

Murali
Starting Member

4 Posts

Posted - 2002-02-07 : 00:07:37
1.Does SQLServer 7.0 supports functions

2.Can a procedure be called with in a select statment

Thanks
Murali


Nazim
A custom title

1408 Posts

Posted - 2002-02-07 : 00:13:39
Hi,

AFAIK both the options are available in Sql Server 2000 but NOT in Sql server 7.0.

but you can certainly use Stored procedure's to work your way.

if you have any specific Question which you are struggling on ,post it here. we might be able to help you.



--------------------------------------------------------------
Dont Tell God how big your Problem is , Tell the Problem how Big your God is
Go to Top of Page

Murali
Starting Member

4 Posts

Posted - 2002-02-07 : 00:47:03
Thanks Nazim,
I have a table called Location,with fields
LID,NAME,PARENT,TYPE, in this table locationid,name,parent_entity,type(DATA/CONSOL) will be stored.for each data location,data is available in another table called FACT.
suppose What to be done if i want to display values against each CONSOL locations(which have data locations).
For example C1 is consol location and parent_entity which has D1 & D2
Data locations and as well as C2 is consol location and parent_entity which has D3 & D4.
So against values to be retrieved for data locations and displayed as below
C1 = D1+D2
C2 = D3+D4
like above there may be more than one consolidation level.

I hope you understand the problem

Thanks
Murali




Go to Top of Page

Nazim
A custom title

1408 Posts

Posted - 2002-02-07 : 02:26:20
Am not sure if i have understood your question.

from whatever i could make it out. i think a simple left join should do what you are looking for.

select l.type,sum(isnull(f.data),0) from location l
left join
fact f
on l.type=f.type
group by l.type


if this isnt what you want .Plz, provide some sample data in both the location and fact table with expected results.

HTH

quote:

I have a table called Location,with fields
LID,NAME,PARENT,TYPE, in this table locationid,name,parent_entity,type(DATA/CONSOL) will be stored.for each data location,data is available in another table called FACT.
suppose What to be done if i want to display values against each CONSOL locations(which have data locations).
For example C1 is consol location and parent_entity which has D1 & D2
Data locations and as well as C2 is consol location and parent_entity which has D3 & D4.
So against values to be retrieved for data locations and displayed as below
C1 = D1+D2
C2 = D3+D4
like above there may be more than one consolidation level.

I hope you understand the problem

Thanks
Murali








--------------------------------------------------------------
Dont Tell God how big your Problem is , Tell the Problem how Big your God is
Go to Top of Page
   

- Advertisement -