July 17, 2011 at 8:59 pm
Hi all,
I am having a task to express mathematical expression to table in sql server. Something like a formula in Excel:
A1 + B1
with value B1 come from C1 + D1 - E1.
From this, i come up with something like a tree and parent-children structure table which stored the value, the operator, level etc.... but still not point out anything yet.
I need any help and I'm very appreciate any suggest and idea from you guys.
Thanks and Regards
sol
July 17, 2011 at 9:09 pm
Could you please post the DDL, INSERTS for Test Data, etc.
Check out the first link.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
July 17, 2011 at 9:14 pm
Sol, this is screaming homework problem, or interview question.
Please, show us what you've got so far and have worked out on your own, and we'll be happy to try to help you go from there.
EDIT: If it's not, on a second reading, then you've oversimplified what you're really trying to do here. An excel formula building a node tree is not exactly simple to picture. We're going to need a LOT more detail.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
July 17, 2011 at 9:16 pm
Welsh Corgi (7/17/2011)
Could you please post the DDL, INSERTS for Test Data, etc.Check out the first link.
hi ,
Because i'm still thinking about this problem and don't come up with anything yet, so i don't have DDL and test data.
If i come up with something that i think it is a "solution" i will definitely post it.
Edit:
@Craig Farrell: this is my homework, not interview question or anything else :D.
Thanks for your interested.
Regards,
sol
July 18, 2011 at 6:22 am
With the description you provide, it is hard to tell, but...are you referring to a computed column? Google the phrase and see if that helps at all.
Traci
July 19, 2011 at 1:30 pm
Your description of the problem alone is not clear enough. Since the question is essentially how to develop the DDL for the table and SQL query, let us know how the result of the query should look.
"Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho
July 19, 2011 at 2:15 pm
sol.nt (7/17/2011)
Welsh Corgi (7/17/2011)
Could you please post the DDL, INSERTS for Test Data, etc.Check out the first link.
hi ,
Because i'm still thinking about this problem and don't come up with anything yet, so i don't have DDL and test data.
If i come up with something that i think it is a "solution" i will definitely post it.
Edit:
@Craig Farrell: this is my homework, not interview question or anything else :D.
Thanks for your interested.
Regards,
sol
Let me give you a hint for your homework project.
Develop Business Requirements
Translate Business Regirements into a logical mode
Create a physical Database design
Implemet your physical design
Develop your program Logic
Create your prgram objects
Test and debug, etc
Think about it and get back to us.
Good luck with your homework assignment. 😛
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply