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 a live lock? : Sql server database administration
What are window functions in sql server?
what is a correlated sub-query? : Sql server database administration
What is a file group?
Suppose you want to implement the one-to-one relationships while designing tables. How would you do it?
What is the difference between dataadapter and datareader?
what's the maximum size of a row? : Sql server database administration
What is RMS migrations?
Why do we backup Active Directory ?
What is the need for group functions in sql?
What do you mean by table and field in sql?
what are user defined datatypes and when you should go for them? : Sql server database administration
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?
What are different types of raid levels?
How can windows applications connect to sql servers via odbc?