[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1258
  • Last Modified:

STRCONV in Access queries

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
pharries
Asked:
pharries
  • 3
  • 3
  • 2
1 Solution
 
HelicopterCommented:
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
 
pharriesAuthor Commented:
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
 
SPECIALISTCommented:

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
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
HelicopterCommented:
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
 
pharriesAuthor Commented:
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
 
HelicopterCommented:
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
 
pharriesAuthor Commented:
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
 
SPECIALISTCommented:
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now