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 |
|
Deep123
Starting Member
8 Posts |
Posted - 2009-06-15 : 03:32:15
|
| can i write the query this wayselect *,(select fullname from users where username='deepan')+ (select fullname from company_admininfo where username='deepan' )as usernamefrom documents d where docname='ComposeMail_Div.txt' and path='~//projects//deepan_5_Test123\TestFolder^6' order by projectrev descusername returns null |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-06-15 : 03:47:31
|
select *,coalesce((select fullname from users where username='deepan'), '')+ coalesce((select fullname from company_admininfo where username='deepan' ), '') as usernamefrom documents d where docname='ComposeMail_Div.txt' and path='~//projects//deepan_5_Test123\TestFolder^6' order by projectrev desc E 12°55'05.63"N 56°04'39.26" |
 |
|
|
ahmad.osama
Posting Yak Master
183 Posts |
Posted - 2009-06-15 : 03:48:07
|
quote: Originally posted by Deep123 can i write the query this wayselect *,(select fullname from users where username='deepan')+ (select fullname from company_admininfo where username='deepan' )as usernamefrom documents d where docname='ComposeMail_Div.txt' and path='~//projects//deepan_5_Test123\TestFolder^6' order by projectrev descusername returns null
Is there a connection between users and company_admininfo tableyou can try this[code] select a.fullname+b.fullname from users a,comapny_admininfo bwhere a.id=c.idRegards,Ahmad Osama |
 |
|
|
|
|
|