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 / kiranu
Hi every one
select name, cardno(case substring(cardno,1,1)when '4' then
'Visa' when '5' then 'Master' end) as Result from account;
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the difference between upgrade and migration in sql server?
What are the general features of sql server management studio? : sql server management studio
What is report snapshot in ssrs?
Explain about unique identifier data type in sql server?
What is sql server agent and what are the two modes of authentication in sql server?
How do I run sql server 2014?
Can group by be used without aggregate functions?
You want your report to display a hyperlink that will take users to your intranet. How do you configure such a hyperlink?
What is normalization and what are the advantages of it?
What is Federation and Federation Member?
What is join query?
What is indexing a document?
You want to use bids to deploy a report to a different server than the one you chose in the report wizard. How can you change the server url?
How many levels of sp nesting is possible?
What is server-level principal?