|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
SQL QuestionThis seems like something I should know, but DUH, here goes: Lets say I have a field that may have a really long data string, say 50,000 characters, but I only need the first 300 characters. Anything beyond that is a waste of system resources. Is there a way in the SQL select statement I can retreive only the first XX characters of a field string? Thanks, Robert B. Harrison Director of Interactive Services, Ext. 205 155 East Main Street Smithtown, NY 11787 P (631) 361-4400 F (631) 361-6400 http://www.linx.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:25:2042 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/25 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:25 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.25 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54 |
|
|
|
|
|
|
|
|
Re: SQL QuestionOn 11/23/05, Robert Harrison <RobertH@...> wrote:
> > This seems like something I should know, but DUH, here goes: > > Lets say I have a field that may have a really long data string, say > 50,000 characters, but I only need the first 300 characters. Anything > beyond that is a waste of system resources. > > Is there a way in the SQL select statement I can retreive only the first > XX characters of a field string? > It would help if you told us what database you're using! ;) In Oracle, you can do SUBSTR(myColumn, 1, 300). I'm sure SQL Server has an equivalent, whether it be SUBSTR() or a LEFT() function or something. Regards, Dave. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:25:2045 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/25 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:25 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.25 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54 |
|
|
RE: SQL QuestionSELECT LEFT(some_field,300) FROM table_foo
--------------------------------------------------- Donn Morrill TGP Associates, Inc. Director of Technology 212-695-1010 x112 dmorrill@... www.tgpassociates.com -----Original Message----- From: Robert Harrison [mailto:RobertH@...] Sent: Wednesday, November 23, 2005 10:01 AM To: NYCFUG Subject: SQL Question This seems like something I should know, but DUH, here goes: Lets say I have a field that may have a really long data string, say 50,000 characters, but I only need the first 300 characters. Anything beyond that is a waste of system resources. Is there a way in the SQL select statement I can retreive only the first XX characters of a field string? Thanks, Robert B. Harrison Director of Interactive Services, Ext. 205 155 East Main Street Smithtown, NY 11787 P (631) 361-4400 F (631) 361-6400 http://www.linx.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:25:2046 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/25 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:25 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.25 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54 |
|
|
|
|
|
Re: SQL QuestionOn 11/23/05, Cook, Scott <scott.cook@...> wrote:
> Ok, who won that one? :-) > Ha! I didn't even realize there were this many people on the list! Good to know there's still CF in New York other than my job! Regards, Dave. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:25:2048 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/25 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:25 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.25 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54 |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |