adspace
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
What is the difference between for xml raw and for xml auto?
How can I check that whether automatic statistic update is enabled or not?
What is a coalesce function?
what is the Ticketing tool used in Wipro technologies at Bangalore...???
Why use identity in sql server?
What is in place upgrade in sql server?
How can you append an identity column to a temporary table?
Explain “row_number()” in sql server with an example?
Does view occupy space?
How to provide default values to function parameters?
What are the different SQL Server Versions you have worked on?
How to remove duplicate rows from table except one?
What are the kinds of subquery?
Why and when do stored procedure recompile?
How to rebuild the master database?