New topic: Is there a way... SQL string
<http://forums.realsoftware.com/viewtopic.php?t=46072> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message tseyfarth Post subject: Is there a way... SQL stringPosted: Wed Nov 28, 2012 6:31 pm Joined: Sat Dec 04, 2010 9:14 pm Posts: 748 Hello all, I want to assign a SQL command string to a single string variable. The string is LONG, so it would be best to have it in several lines, rather than one LONG line. How to do this?! The first example is the same as the second, except that the first is really one long line in code. The second would be far better, but I cannot get RS to recognize the use of the "_" to extend the code to the next line. Ideas? Thanks, Tim q = "select site_listing.acc acc, site_listing.siteno siteno, site_listing.sitename sitename, site_listing.usrint_lic_qty usrint_lic_qty, site_listing.usrint_lic_used usrint_lic_used, site_listing.lic_paid lic_paid, site_listing.email email,site_listing.address address, site_listing.address1 address1, site_listing.city city, site_listing.countrycode countrycode, site_listing.phone phone, site_listing.postcode postcode, site_listing.state state, site_listing.country country, site_listing.start_date start_date, site_listing.exp_date exp_date, site_listing.install_date_axcys install_date_axcys, site_listing.install_date_embedded install_date_embedded, site_listing.subscription_support_yrending subscription_support_yrending, site_listing.last_purch_date last_purch_date, site_listing.last_purchase_item last_purchase_item, site_listing.subscription_support_purchase_date subscription_support_purchase_date, site_listing.last_purchase_buyer last_purchase_buyer from site_listing site_listing" q = select site_listing.acc acc, site_listing.siteno siteno, site_listing.sitename sitename, site_listing.usrint_lic_qty usrint_lic_qty, site_listing.usrint_lic_used usrint_lic_used, site_listing.lic_paid lic_paid, site_listing.email email, site_listing.address address, site_listing.address1 address1, site_listing.city city, site_listing.countrycode countrycode, site_listing.phone phone, site_listing.postcode postcode, site_listing.state state, site_listing.country country, site_listing.start_date start_date, site_listing.exp_date exp_date, site_listing.install_date_axcys install_date_axcys, site_listing.install_date_embedded install_date_embedded, site_listing.subscription_support_yrending subscription_support_yrending, site_listing.last_purch_date last_purch_date, site_listing.last_purchase_item last_purchase_item, site_listing.subscription_support_purchase_date subscription_support_purchase_date, site_listing.last_purchase_buyer last_purchase_buyer from site_listing site_listing Top ktekinay Post subject: Re: Is there a way... SQL stringPosted: Wed Nov 28, 2012 6:51 pm Joined: Mon Feb 05, 2007 5:21 pm Posts: 274 Location: New York, NY dim l() as string = Array( _ "Select ", _ "site_listing.acc acc,", _ "site_listing.siteno siteno,", _ "site_listing.sitename sitename,", _ ... _ "from ", _ "site_listing site_listing" _ ) q = join( l, " " ) Or: dim l() as string l.Append "Select " l.Append "site_listing.acc acc," l.Append "site_listing.siteno siteno," .. l.Append "from " l.Append "site_listing site_listing" q = join( l, " " ) Or: q = _ "select " + _ "site_listing.acc acc," + _ "site_listing.siteno siteno," + _ ... _ "from " + _ "site_listing site_listing" These are in order from fastest to slowest. _________________ Kem Tekinay MacTechnologies Consulting http://www.mactechnologies.com/ Need to develop, test, and refine regular expressions? Try RegExRX. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
