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.
| Author |
Topic |
|
Murali
Starting Member
4 Posts |
Posted - 2002-02-07 : 00:07:37
|
| 1.Does SQLServer 7.0 supports functions2.Can a procedure be called with in a select statmentThanksMurali |
|
|
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 |
 |
|
|
Murali
Starting Member
4 Posts |
Posted - 2002-02-07 : 00:47:03
|
| Thanks Nazim,I have a table called Location,with fieldsLID,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 & D2Data 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 belowC1 = D1+D2C2 = D3+D4like above there may be more than one consolidation level.I hope you understand the problemThanksMurali |
 |
|
|
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 lleft joinfact fon l.type=f.typegroup by l.typeif this isnt what you want .Plz, provide some sample data in both the location and fact table with expected results.HTHquote: I have a table called Location,with fieldsLID,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 & D2Data 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 belowC1 = D1+D2C2 = D3+D4like above there may be more than one consolidation level.I hope you understand the problemThanksMurali
--------------------------------------------------------------Dont Tell God how big your Problem is , Tell the Problem how Big your God is |
 |
|
|
|
|
|
|
|