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 |
|
jpsb
Starting Member
3 Posts |
Posted - 2008-09-02 : 12:55:15
|
| Is this the correct forum to ask a question about an SQL problem I am having?thanksjim s |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-09-02 : 12:56:41
|
for MS SQL ? yes |
 |
|
|
jpsb
Starting Member
3 Posts |
Posted - 2008-09-02 : 13:07:38
|
| My problem is that I am trying to port to MS SQL an I have a very simple Oracle query that I can not write in ANSI1999 SQLSELECT char_value FROM prefs_mchar a, preferences bWHERE a.pref_id (+) = b.pref_id;I was hoping to get some help here. |
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-09-02 : 13:21:10
|
| try thisSELECT char_value FROM prefs_mchar a, preferences bWHERE a.pref_id = b.pref_id |
 |
|
|
acollins74
Yak Posting Veteran
82 Posts |
Posted - 2008-09-02 : 13:25:54
|
| I think what you are referring to is a left or right outer join that used to be referred to in MS SQL as *=If you are connecting to MS SQL 2005 you will have to explicitly write out your join statement as the above has been depricated with ansi-92.select a.char_value from prefs_mchar a left join preferences bon a.pref_id = b.pref_idHope this helps |
 |
|
|
jpsb
Starting Member
3 Posts |
Posted - 2008-09-02 : 14:39:49
|
| thanks for all the replies, I have been digging deeper and I think I am up the creek,seems that the orginal author used the outer join to create a super set of results and then used ANDs to contrain the results. Discovered at O'Reily that this is no longer possible to do. Or in other words, once the outer join creates the result set it's not possible to reduce it. At least that is my take and seems to be true since adding an add to the query doesn't constrain the result one bit. Hate to have to use a view, but look like I might have too. |
 |
|
|
|
|
|