i have account table which consists of account name,card no
and card no consists 16 digits now i want to retrieve the
data if card no starts from 4 then it should print visa and
if it starts from 5 then it should print master so plse help
me to write simple query with out store procs .
Answer Posted / rahul
hi every one.
select name,
case
when card_no like'4%' then 'visa'
when card_no like'5%' then 'master'
end result from account;
Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is compound operators?
Explain relational data?
Explain different backup plans?
What does the on update no action do?
What is raid? : SQL Server Architecture
What are the difference between “where” and “having” clause in sql server?
What is triggers and its types?
What is the command used to recompile the stored procedure at run time?
What is save transaction and save point?
What is an identity?
What are the three different part of rdl file explain them?
What the difference between UNION and UNIONALL?
Do you know spatial data types - geometry and geography in sql server 2008?
What are the differences between user defined functions and stored procedures?
What are different types of roles provided by ssrs?