RE: An SQL 92 question

  • From: Rodney Haynie <RodneyH@xxxxxxxxxx>
  • To: "programmingblind@xxxxxxxxxxxxx" <programmingblind@xxxxxxxxxxxxx>
  • Date: Mon, 3 Dec 2007 09:45:37 -0500

Charles,
I am not sure the method you posted is giving you a carriage return, or  just 
giving you a whole bunch of spaces that push you to the next line.
CHAR(13) is carriage return
CHAR(10) is Line Feed.

You may be able to concatinate these two values into the string, but I think it 
depends on where the result set will be used to know if it will appear 
correctly for you.

So something like the following may work for you.  I wrote this up in SQL 
Server 2000, so you may have to tweak the syntax if you get an error.

SELECT 'Line One' + CHAR(13) + CHAR(10) + 'Line 2'


HTH.
Rodney


From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of 
Charles_Davis@xxxxxxx
Sent: Monday, December 03, 2007 8:40 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: An SQL 92 question


Just a quick SQL question:

I am using Borland's Interbase which apparently implements a subset of SQL-92.  
I am trying to have the output contain certain control characters (for 
formatting).  Interbase has a user_defined function called ASCII_CHAR(), but 
that apparently cannot be used in the SELECT clause.

I discovered that I can insert CRLFs by doing:

Select '
'

But I cannot figure out how to insert form feeds.

Thanks for the help.

Regards,
Charles Davis

Other related posts: