473,385 Members | 1,531 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Adding hard return in query

I have this simple query:
SELECT [Fld1] & [Fld2] AS NewField
FROM Members;

Now, in this query, I would like to add a hard return between Fld1 and Fld2.
I tried adding a VbCRLF but that doesn't seem to work. Any ideas?
Thanks,
john
Feb 10 '07 #1
2 2085
On Sat, 10 Feb 2007 22:58:01 +0100, john wrote:
I have this simple query:
SELECT [Fld1] & [Fld2] AS NewField
FROM Members;

Now, in this query, I would like to add a hard return between Fld1 and Fld2.
I tried adding a VbCRLF but that doesn't seem to work. Any ideas?
Thanks,
john
vbCrLf is a VBA constant and won't work outside of VBA code.

Select [Fld1] & chr(13) & chr(10) & [Fld2] as NewField
From Members;

Note also that the chr(13) & chr(10) must be used in that order.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Feb 10 '07 #2
Thanks!
john

"fredg" <fg******@example.invalidschreef in bericht
news:1p******************************@40tude.net.. .
On Sat, 10 Feb 2007 22:58:01 +0100, john wrote:
>I have this simple query:
SELECT [Fld1] & [Fld2] AS NewField
FROM Members;

Now, in this query, I would like to add a hard return between Fld1 and
Fld2.
I tried adding a VbCRLF but that doesn't seem to work. Any ideas?
Thanks,
john

vbCrLf is a VBA constant and won't work outside of VBA code.

Select [Fld1] & chr(13) & chr(10) & [Fld2] as NewField
From Members;

Note also that the chr(13) & chr(10) must be used in that order.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

Feb 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tryfon Gavriel | last post by:
Hi all I recently noticed when trying to optimise a major query of a chess website I am the webmaster of, that adding an order by for "gamenumber" which is a clustered index field as in for...
3
by: Catherine Jo Morgan | last post by:
I have TblRoles and TblRoleTypes. The main reason for RoleTypes is to make it easier to categorize roles for people and organizations. For example, RoleType entries include Client roles, Climb...
8
by: Adam Louis | last post by:
I would like help resolving this problem. I'm a novice who's been hired to query a hospital database and extract useful information, available to me only in a dynamically generated, downloadable...
2
by: Viorel | last post by:
Adding new row with default values. In order to insert programmatically a new row into a database table, without direct "INSERT INTO" SQL statement, I use the well-known DataTable.NewRow,...
6
by: Rudy | last post by:
Hi all, I know this is easy, just can't seem to get it. I have a windows form, and a text box, with a value already in it. I need to add that value to a table. It's just one value, so the entire...
4
by: John Siracusa | last post by:
I recently had a problem where a bunch of postgres backends were taking up huge amounts of CPU time. I found a bunch of log messages like this: NOTICE: adding missing FROM-clause entry for...
28
by: Ilias Lazaridis | last post by:
I understand that I can use __metaclass__ to create a class which modifies the behaviour of another class. How can I add this metaclass to *all* classes in the system? (In ruby I would alter...
0
by: daokfella | last post by:
Hi all, I added a dataset to my project and dragged over a table from server explorer. I modified the dataadapter to use existing stored procedures for the Get, Insert, Update and Delete. I've...
5
by: r00m23 | last post by:
I have only been doing php for about 24 hours and have read about 50 tutorials discussing the subject. I am confused though because I can't get my script to work like I want it to. Last night I had a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.