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
 General SQL Server Forums
 New to SQL Server Programming
 Returning results from formula stored in field.

Author  Topic 

mohdrashid
Starting Member

23 Posts

Posted - 2011-06-07 : 21:43:12
hi all,
I have the following tables:
WorkOrderline
WoLineId, PdtId, Height, Width
1, 2, 2000,3000
2, 2, 1000,2000

Products
PdtId, Details
2, A001
3, B001

PanelSetup
PanelSetupId, PdtId, HeighFormula, WidthFormula, QtyReq
1, 2,((HEIGHT - 121) - 22 - 260) / 2, ((WIDTH - 90) / 2) -14, 4
2, 2, 260, ((WIDTH - 90) / 2) -14, 2
3, 3, (HEIGHT - 121), (WIDTH - 90) /2, 2

I would like to return a query result, at least in a temp table;

WoLineId, PdtId, QtyReg, PanelSEtupid, HeightResult, WidthResult,
1, 2, 4, 1, 798, 941
1, 2, 2, 2, 260, 941

I hope i am clear enough and not cause any irritations.

thanks in advance
rashid.




khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2011-06-07 : 22:40:52
This looks like something that can only be done with Dynamic SQL


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -