Geeks With Blogs
I, Codemonkey Codemonkeying Around June 2007 Entries
Nested String Statements
Here's a strange one. Last night I had a dream about nested strings. The most obvious use of this would be in a nested SQL statement, so here's a made up on the fly example: select phone_number from Addressbook where name = (select name from customers where city = 'Atlanta') But instead of writing that out as a string in my code, I did this crazy thing: string sQuery = "select name from customers where city = 'Atlanta'"; sQuery = " select phone_number from Addressbook where name = (" + sQuery + ")"; ......

Posted On Monday, June 25, 2007 8:11 AM

Copyright © Chas Williams | Powered by: GeeksWithBlogs.net