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.
| Author |
Topic |
|
jafrywilson
Constraint Violating Yak Guru
379 Posts |
Posted - 2010-09-30 : 17:06:23
|
| I have a table tbl_user it have a column cse .It contains id's of another table (CSE_LIST) column name (cse) ..Now how to select the list using the id in tbl_user By using login_name |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-09-30 : 17:13:41
|
| Please post table definitions, sample data and desired output. Read this to see the best way to post this to get quick responses.[url]http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]--Gail ShawSQL Server MVP |
 |
|
|
jafrywilson
Constraint Violating Yak Guru
379 Posts |
Posted - 2010-09-30 : 17:18:19
|
| select cse from cse_list where id=( select cse from tbl_user where login_name='wer')and i got this error Msg 8114, Level 16, State 5, Line 1Error converting data type varchar to numeric. |
 |
|
|
jafrywilson
Constraint Violating Yak Guru
379 Posts |
Posted - 2010-09-30 : 17:21:05
|
| Tbl_user login_name | csewer |1,2,3,4Table_cseid |cse1 |hai2 |hello3 |sample4 |sample5 |sample |
 |
|
|
jafrywilson
Constraint Violating Yak Guru
379 Posts |
Posted - 2010-09-30 : 17:22:10
|
| By using the login_name i need to select the cse. |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2010-09-30 : 17:49:37
|
| Jafry-There's enough overlap between this thread and http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=150930, it doesn't help to have 2 posts. Before you start a new thread be sure that the question/problem is substantially different from what you've posted recently. And if you do create a new post, don't repeat the same question when updating an earlier post. It's very frustrating for everyone who's trying to help when they see the same questions multiple times. Which thread should we answer?Thanks. |
 |
|
|
jafrywilson
Constraint Violating Yak Guru
379 Posts |
Posted - 2010-09-30 : 17:54:28
|
| Sorry Robvolk ..This post is not clear to users so I tried to split my question to get the answer quickly.. |
 |
|
|
jafrywilson
Constraint Violating Yak Guru
379 Posts |
Posted - 2010-09-30 : 18:24:58
|
| Please goto this linkhttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=150930 |
 |
|
|
|
|
|