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 / rajesh bhawsar
select name,
(case left(cardno,1)
when '4' then 'visa'
when '5' then 'master'
end) as result from account
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
1.how to find the dead lock in sql server? 2.How to fine the memory leaks in sql server? 3.suppose transaction log file increasing what action will take ?
How to drop an existing user defined function in ms sql server?
what stored procedure would you use to view lock information? : Sql server administration
How to delete existing triggers using "drop trigger"?
Describe different Processing Modes offered by SSRS?
Do you know the policy based administration feature of sql server 2008?
What are the different kinds of ssrs reports?
What is model database? : SQL Server Architecture
Does partitioning ssd reduce performance?
What is sub query and its properties?
Please explain what is “asynchronous” communication in sql server service broker?
What are the differences between web role and worker role?
can any body tell me how to know the password of current user in sql server
What are different types of schemas?
What is join query?