Solved

STRCONV in Access queries

Posted on 1998-08-01
8
1,141 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
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 how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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…

743 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

16 Experts available now in Live!

Get 1:1 Help Now