SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Regarding Select Statement
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kiran.J
Starting Member

11 Posts

Posted - 02/01/2008 :  05:30:27  Show Profile  Reply with Quote
how can i select phone number from two tables

sunil
Constraint Violating Yak Guru

India
282 Posts

Posted - 02/01/2008 :  05:32:29  Show Profile  Reply with Quote
What tables you are referring to? Provide some DDL and expected output to get any help here from forum users.

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

elancaster
A very urgent SQL Yakette

United Kingdom
1208 Posts

Posted - 02/01/2008 :  05:32:43  Show Profile  Reply with Quote
for the benefit of anyone else reading.... the questions began here....
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=96581

so...
what tables? what columns? you need to give more detail

Em
Go to Top of Page

kiran.J
Starting Member

11 Posts

Posted - 02/01/2008 :  05:34:09  Show Profile  Reply with Quote
how can i update gender male to m using select statement
Go to Top of Page

elancaster
A very urgent SQL Yakette

United Kingdom
1208 Posts

Posted - 02/01/2008 :  05:37:30  Show Profile  Reply with Quote
well, given the generic nature of the question i would have to reply equally generically... i'd do it with a case statement.

if you give examples etc as requested we could help more

Em
Go to Top of Page

kiran.J
Starting Member

11 Posts

Posted - 02/01/2008 :  05:49:34  Show Profile  Reply with Quote
i have table gender
m
f
i want change m to male
and f -female
using selct statement
Go to Top of Page

kiran.J
Starting Member

11 Posts

Posted - 02/01/2008 :  05:51:14  Show Profile  Reply with Quote
i have 2 tables emp and phone
i was select phone numer and empname using primarykey as empno
Go to Top of Page

sunil
Constraint Violating Yak Guru

India
282 Posts

Posted - 02/01/2008 :  05:54:29  Show Profile  Reply with Quote
Do you have one requirement or many ? Every time you post, you are coming up with different thing. Please see this post in same thread on 02/01/2008 : 05:32:29 to get any help. If you don;t follow, I'm sorry but no one can help you. Hope you understand this.
Go to Top of Page

khtan
In (Som, Ni, Yak)

Singapore
17681 Posts

Posted - 02/01/2008 :  08:16:57  Show Profile  Reply with Quote
please constraint your self into one problem / question per thread. If you mix 2 question in the same thread, you are confusing others who are trying to help you.


KH
Time is always against us

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 02/01/2008 :  08:53:54  Show Profile  Reply with Quote
quote:
Originally posted by kiran.J

i have table gender
m
f
i want change m to male
and f -female
using selct statement



What no other or both?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

elancaster
A very urgent SQL Yakette

United Kingdom
1208 Posts

Posted - 02/01/2008 :  08:58:44  Show Profile  Reply with Quote
i gave up thinking about it when i tried to decide why one would need a TABLE for gender? does that mean M, F are columns? ...i need another coffee

Em
Go to Top of Page

kiran.J
Starting Member

11 Posts

Posted - 02/02/2008 :  00:16:32  Show Profile  Reply with Quote
ya.
i have table emp in that table column gender in gender i have male and female
when i updete that two fields male to m and female to m
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 02/02/2008 :  00:20:15  Show Profile  Reply with Quote
UPDATE emp
SET gender = CASE WHEN gender='m' THEN 'male'
WHEN gender='f' THEN 'female'
END
Go to Top of Page

kiran.J
Starting Member

11 Posts

Posted - 02/02/2008 :  00:30:24  Show Profile  Reply with Quote
thanq
Go to Top of Page

kiran.J
Starting Member

11 Posts

Posted - 02/02/2008 :  00:31:43  Show Profile  Reply with Quote
how can i select empname only 3 characters
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000