473,326 Members | 2,133 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,326 software developers and data experts.

Help needed in query

Hi

I 've a mdb which has one table and the structure would be

tab1
----

no integer
ch char(1) may hold either 'a' or 'b' OR 'C'

------------------

IF I SELECT THE ABOVE TABLE Tab1 thru query in Data environemnt of
VB6.0 i NEED THE RESULT TO DISPLAY ALL THE RECORDS(ABBRIVATION) LIKE
THE

NO CH
-------------
1 APPLE 'FOR VALUE 'A'
2 BOY 'FOR VALUE 'B'
3 CAT 'FOR VALUE 'C'

HOW TO DO THIS IN ACCESS (IS THERE IS ANY 'SELECT CASE ')

With Regards
Raghuraman
Nov 12 '05 #1
3 1139
Hi,

There is a Text manipulation function in Access using which you can
change the case of the string or char in the database.
It is Ucase. You will use it like Ucase( tb1.fieldname).

The opposite function is Lcase.

HTH
Nov 12 '05 #2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use the Access built-in function IIf(). E.g. (watch out for line
wrap):

IIf(Value="A","Apple", IIf(Value="B","Boy",
IIf(Value="C","Cat","Unknown")))

You can also use the Switch() function (easier). E.g.:

Switch(Value="A","Apple", Value="B","Boy", Value="C","Cat")
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQEZet4echKqOuFEgEQL5zwCeLVPuVCkF/vno2bXeP9/uXvdZ+7YAnjJF
ffYJcL+J0hG/cyD8ZGPd/CNZ
=fZuh
-----END PGP SIGNATURE-----
Raghuraman wrote:

< SNIP >

NO CH
-------------
1 APPLE 'FOR VALUE 'A'
2 BOY 'FOR VALUE 'B'
3 CAT 'FOR VALUE 'C'

HOW TO DO THIS IN ACCESS (IS THERE IS ANY 'SELECT CASE ')


Nov 12 '05 #3

Hi,

Thanks all to the reply.

I am bit satisfied by the IIF & SWITCH Functions and i shall also try.
Could u please tell me how to use these functions in the sql-statement
of Data environment, that would better satisfy me.
With Regards
Raghu

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #4

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

Similar topics

1
by: Erich Trowbridge | last post by:
Has anybody seen this tool? It is awesome. check out http://vw.vermeer.org/ . It's a php front end for large-scale syslog deployments. It makes managing syslog in large networks a snap. The idea...
1
by: Ralph Freshour | last post by:
I'm not sure the follow multiple table query is the right way to do what I need to do although it seems to be working: $php_SQL = "SELECT * ". "FROM basics, personal, photos ". "WHERE...
4
by: Surendra | last post by:
I have this query that I need to use in an Update statement to populate a field in the table by the value of Sq ---------------------------------------------------------------------------- Inline...
9
by: netpurpose | last post by:
I need to extract data from this table to find the lowest prices of each product as of today. The product will be listed/grouped by the name only, discarding the product code - I use...
28
by: stu_gots | last post by:
I have been losing sleep over this puzzle, and I'm convinced my train of thought is heading in the wrong direction. It is difficult to explain my circumstances, so I will present an identical...
6
by: paii | last post by:
I have a table that stores job milestone dates. The 2 milestones I am interested in are "Ship Date" TypeID 1 and "Revised Ship Date" TypeID 18. All jobs have TypeID 1 only some jobs have TypeID 18....
5
by: Alicia | last post by:
Hello everyone based on the data, I created a union query which produces this. SELECT ,,, 0 As ClosedCount FROM UNION SELECT ,, 0 AS OpenedCount, FROM ORDER BY , ;
7
by: Aaron | last post by:
Complete code follows. I am new to .NET programming (and programming in general) and I am having a difficult time understanding how to fill a variable in one sub, and then access it from...
6
by: Takeadoe | last post by:
Dear NG, Can someone assist me with writing the little code that is needed to run an update table query each time the database is opened? From what I've been able to glean from this group, the...
0
by: Chuck36963 | last post by:
Hi all, I've been working on a listing problem and I can't figure out how to work it out. I have looked far and wide on the web to find answers, but I'd like other peoples input on my project in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.