need some SQL help

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

can some look at this select statement and tell me whats wrong with it/
I keep getting an error on the SELECT.

dbCommand = New SqlDataAdapter("select EffectiveDate,RD as type" & _
"SELECT Case type WHEN
type='Yes' THEN type='Regional Developer' End as type" & _
"PointsDistributed from Points",
dbConnection)


what i need to to is if type=yes then type=regional developer and if type=no
then type=national developer

thanks
 
try this:

dbCommand = New SqlDataAdapter("select EffectiveDate, " & _
" Case WHEN RD='Yes' THEN
'Regional Developer' ELSE "'National Developer' End as type " & _
"PointsDistributed from Points",

Regards
Martin
 

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

Back
Top