Solved

STRCONV in Access queries

Posted on 1998-08-01
8
1,148 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
 
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now