Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Regarding Select Statement

Author  Topic 

kiran.J
Starting Member

11 Posts

Posted - 2008-02-01 : 05:30:27
how can i select phone number from two tables

sunil
Constraint Violating Yak Guru

282 Posts

Posted - 2008-02-01 : 05:32:29
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

1208 Posts

Posted - 2008-02-01 : 05:32:43
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 - 2008-02-01 : 05:34:09
how can i update gender male to m using select statement
Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-02-01 : 05:37:30
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 - 2008-02-01 : 05:49:34
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 - 2008-02-01 : 05:51:14
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

282 Posts

Posted - 2008-02-01 : 05:54:29
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)

17689 Posts

Posted - 2008-02-01 : 08:16:57
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
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2008-02-01 : 08:53:54
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

1208 Posts

Posted - 2008-02-01 : 08:58:44
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 - 2008-02-02 : 00:16:32
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

52326 Posts

Posted - 2008-02-02 : 00:20:15
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 - 2008-02-02 : 00:30:24
thanq
Go to Top of Page

kiran.J
Starting Member

11 Posts

Posted - 2008-02-02 : 00:31:43
how can i select empname only 3 characters
Go to Top of Page
   

- Advertisement -