Ask a Question related to Coldfusion Database Access, Design and Development.
-
merlinvicki #1
sql help for getting fixed amout of text from database
hi,
I have this SQL statement.:
<cfquery name="showall" datasource="#request.dsn#">
SELECT TOP 6
p.blog_id,p.blog_date,p.blog_headlines,p.blog_cont ents,p.blog_name,p.blog_time,p
..blog_email,p.counter_viewed,p.keywords,p.thumbna il,c.blog_cat_name,c.blog_cat_i
d FROM blog_posts p left outer join blog_category c on p.blog_cat =
c.blog_cat_id order by p.kount desc;
</cfquery>
can somebody guide me how can i return only 200 characters from the database,
not more.
thanx
merlinvicki Guest
-
HoPDFs with some text fixed and some texteditable by Acrobat Reader
Hi there. Can someone help? I have Acrobat 6.0 Standard and I need to create a PDF that has almost all of the text and images fixed but also has a... -
PDFs with some text fixed and some text editable by Acrobat Reader
Hi there. Can someone help? I have Acrobat 6.0 Standard and I need to create a PDF that has almost all of the text and images fixed but also has a... -
Fixed Length Text Extract, Write to Excel
Hello All, I am trying to work with the code I have to extract fields from a text file report, and write the values into excel. I am having... -
Fixed Width layout cells expanding with text ??
Hi - got the same problem I went trhough the tutorial, but have some questions: When it talked about 'balloon cell', and wrote "I have a small... -
Best way to query a flat fixed length text file
I am trying to insert a semi fixed length file into a SQL database. Does anyone know of a way to query a fixed length file like you can a csv to... -
Dan Bracuk #2
Re: sql help for getting fixed amout of text fromdatabase
200 characters of what?
If your db has a substring function you can use it on any character field.
Dan Bracuk Guest
-
merlinvicki #3
Re: sql help for getting fixed amout of text fromdatabase
Originally posted by: Dan Bracuk
200 characters of what?
If your db has a substring function you can use it on any character field.
Hi, Thanks for replying. I have this blog:
[url]http://merlinvicki.in/index.cfm?content=blogs[/url]
i want only 200 chars to be displayed for each entry. Right now all the text i
have in the database is reflected on the page. I just want to constraint it to
display only 200 characters per blog entry. I hope I am clear.
thanx
merlinvicki Guest
-
Dan Bracuk #4
Re: sql help for getting fixed amout of text fromdatabase
So you want the 1st 200 characters of p.blog_contents?
If your db has a substring function use it. Otherwise select the whole field and use the cold fusion left function.
Dan Bracuk Guest
-
merlinvicki #5
Re: sql help for getting fixed amout of text fromdatabase
Grrreat!
Thanxs Dan, The Left function did the trick.
Anybody else looking for the answers can check it out here:
[url]http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/functib2.htm[/url]
regards
merlinvicki
merlinvicki Guest



Reply With Quote

