SQL Question

M

Mike

I'm pulling a data from a column of my SQL DB.The column values are Yes and
No,
what i need to is the value is Yes then write out Helper if its No write
Need Help in my grid

How can i do that?

would this work

SQL = "select RD as type from HelperTable"

if Type = "Yes" then
type = "Helper"
else
type = "Need help"
end if

would this work or no
 
D

Dan Brussee

SELECT CASE
WHEN Type = 'Yes' THEN 'Helper'
WHEN Type = 'No' THEN 'Need help'
END as Type
FROM HelperTable
 
M

Mike

thanks, I'll give this a shot


Dan Brussee said:
SELECT CASE
WHEN Type = 'Yes' THEN 'Helper'
WHEN Type = 'No' THEN 'Need help'
END as Type
FROM HelperTable
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top