Recursion
-
did anyone try writing a recusion procedure without using recursion priciple.....also do not use cursors...any luck, do let me know ;)
bzinez
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * The Value of Smaller Methods * Creating Many-to-Many joins My website | blog
-
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * The Value of Smaller Methods * Creating Many-to-Many joins My website | blog
I've still got a Borland Turbo Pascal manual, in the index it has the entry 'Recursive procedure: See Procedure, recursive' You can guess the rest.
-
did anyone try writing a recusion procedure without using recursion priciple.....also do not use cursors...any luck, do let me know ;)
bzinez
Preyatham wrote:
also do not use cursors
what does that mean ? anyway, if I remember correctly, one can transform a recursive function to a iterative function; is that what you mean ?
Maximilien Lincourt Your Head A Splode - Strong Bad
-
did anyone try writing a recusion procedure without using recursion priciple.....also do not use cursors...any luck, do let me know ;)
bzinez
Preyatham wrote:
did anyone try writing a recusion procedure without using recursion priciple.....also do not use cursors...
Sure. You just need a big enough hammer, and *splat* everything breaks up into nice small chuncks. Marc
-
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * The Value of Smaller Methods * Creating Many-to-Many joins My website | blog
-
Preyatham wrote:
also do not use cursors
what does that mean ? anyway, if I remember correctly, one can transform a recursive function to a iterative function; is that what you mean ?
Maximilien Lincourt Your Head A Splode - Strong Bad
firstly i am talking in sql and not in any other technology... see here is the exact question...write a procedure in which you need to display all direct reports of you..if you do not have a direct report then go for your manager and list his direct reports...write this proc without recursion and without using cursors in the procedure....
bzinez
-
did anyone try writing a recusion procedure without using recursion priciple.....also do not use cursors...any luck, do let me know ;)
bzinez
I am so glad I don't do this boring stuff anymore.
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. - -Lazarus Long
-
did anyone try writing a recusion procedure without using recursion priciple.....also do not use cursors...any luck, do let me know ;)
bzinez
What you're looking for is "Common Table Expressions" -- a query type introduced in SQL Server 2005.
-
I am so glad I don't do this boring stuff anymore.
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. - -Lazarus Long
-
What you're looking for is "Common Table Expressions" -- a query type introduced in SQL Server 2005.
-
Preyatham wrote:
did anyone try writing a recusion procedure without using recursion priciple.....also do not use cursors...
Sure. You just need a big enough hammer, and *splat* everything breaks up into nice small chuncks. Marc
-
I dont know "Common Table Expression". But my intension is to write such a most wanted procedure using only loops and developer friendly with no complexities :-D ....
Preyatham
"I dont know "Common Table Expression"." It was tacitly implied that you should Google it and learn more about it. "But my intension is to write such a most wanted procedure using only loops" SQL + loops = terrible idea.
-
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * The Value of Smaller Methods * Creating Many-to-Many joins My website | blog
Good eye! :laugh: :laugh: :laugh: Mike
Life is not measured by the number of breaths we take, but by the moments that take our breath away. "George Carlin
Semper Fi http://www.hq4thmarinescomm.com[^]
-
i too thought this was a boring stuff..but when started to work for this, it pissed me....once i make a generic procedure i will publish here to take your comments CEO...:)
Preyatham
Preyatham wrote:
.once i make a generic procedure i will publish here
Thats a great approach. Peer review is great way to improve your skills.
Preyatham wrote:
i too thought this was a boring stuff..but when started to work for this, it pissed me
Same for me. Nothing annoyed me more that working with SQL.
Preyatham wrote:
o take your comments CEO..
It's CPs closest description to what I do. I own and run 3 businesses, and do all I can to avoid extra work. :laugh:
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. - -Lazarus Long
-
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * The Value of Smaller Methods * Creating Many-to-Many joins My website | blog
I think the subtlness of that was lost !!! - I was thinking of replying with the saying 'to first understand recursion you must understand recursion' and hit your link, which illustrates it nicely - snicker :-) 'g'