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
Tell me about normalization in DBMS.
What are the types of database recovery models?
Do you know what is user defined datatypes and when you should go for them?
What is the difference between functions and stored procedures?
How to turn off warning messages during php execution?
What is the Disadvantage of indexed sequential file.
where the connection string store in the database
Explain about protocol layer present in SQL server?
How does recursive cte works in sql server?
What is store procedure? How do they work? When do you use?
How to enforce security in sql server? : sql server security
How should i optimize the time for execution of stored procedure having single input and many output from the different tables?
Describe different Processing Modes offered by SSRS?
What is pivot and unpivot?
What are the grouping functions?