Solved

STRCONV in Access queries

Posted on 1998-08-01
8
1,173 Views
Last Modified: 2008-02-26
How do I use the strconv function to modify the output field of a query so that the first letter is capitalised?
Where do I put the expression?
Thanks
Paul
0
Comment
Question by:pharries
  • 3
  • 3
  • 2
8 Comments
 
LVL 8

Expert Comment

by:Helicopter
ID: 1957828
Put it in the query itself like:

SELECT StrConv([txtTest],3) AS capitalised
FROM Table1;
 The 3 is the bit that determines the output type
0
 

Author Comment

by:pharries
ID: 1957829
I could not get this to work.
I kept on getting the message "Syntax error"
So as to be sure The name of the table the data is in is "Windex"
The name of the field is "Word"
Thanks
0
 
LVL 3

Accepted Solution

by:
SPECIALIST earned 50 total points
ID: 1957830

To use this create a field in your query. in this example it is named newfield, the name of the field is word.

Newfield: strconv([word],3)  You can bring the field directly into your query and create a new field that has the captilized letters.

Note, you may or may not need to reference your table name, which would be like

Newfield: strconv([tablename].[word],3)

David

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:Helicopter
ID: 1957831
pharries:

SELECT StrConv([word],3) AS capitalised
FROM Windex;

it's exactly the same. Go into query design and select SQL from the menu and just paste it in. Specialist's answer is the same, except he has given the QBE grid version


0
 

Author Comment

by:pharries
ID: 1957832
I had not realised it was an SQL command helicopter!
i tried Specialists answr first and it worked first time.
Thank you both
Paul
0
 
LVL 8

Expert Comment

by:Helicopter
ID: 1957833
Paul,
you may have tried his answer first, but I posted mine first. If you look at the SQL you will see that my answer was correct.

I realise you may not have known it was SQL (though SELECT..... etc. indicates that) but I think you should have asked for clarification rather than just reject.


0
 

Author Comment

by:pharries
ID: 1957834
Dear Helicopter,
I am new here, I did not know how to clarify without accepting.
I am sorry if you took offence.
I am very new to SQL and the penny did not drop
As this formed part of a complex query (for me) I had no idea where to insert the SQL statement in relation to others.
Thanks again
Paul
0
 
LVL 3

Expert Comment

by:SPECIALIST
ID: 1957835
Helicopter,

I realize your answer was correct also, but part of the reason people in this forum are asking questions from us, they are not as technical and most do not even know what SQL is.  I believe it is important to show someone the easiest possible way to accomplish the task, they will learn better ways later.

I try to put myself in the customers shoes, If they do not know what STRCONVERSION IS, How do they know what SQL is?  It was not that long ago I would have been asking the same questions.

This is not an attempt to belittle you.  I have analyzed your  answers to a number of questions and quite admire some of your responses.  Just an FYI.

David
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question