Question: I am trying to create a link, which will onclick change a session variable like this

```

<a href="/Index" onclick="<% HttpContext.Current.Session["location"] = location;%>" >
    <%=location%>
</a>
```

However, during processing the page the session changes on its own during generating each anchor element (with this onclick attribute). So I would like to create a javascript function like

```

<script type="text/javascript" >
    function session(location) {
        HttpContext.Current.Session["location"] = location;
    }
</script>

```

Unfortunatelly, I don't know enough, so this doesn't seem working.. Any ideas?
Thanks in advance

Answer: 
You are using CROSS JOIN, not LEFT OUTER JOIN so it is definitely not the same query.

Your old-style syntax query is wrong, or at least doesn't contain the outer join to br\_fx that you presumably think it does, because of the lack of a (+) symbol on this part:

```
AND br_fx.iso_dst = 'USD'

```

That condition negates the (+) used on

```
AND br_data.user_ten = br_fx.iso_src(+) 

```

so maybe you meant:

```
AND br_fx.iso_dst(+) = 'USD'

```
It looks to me like your syntax is wrong.

```
AND     br_data.last_note_user=as_users.userid(+)  
AND br_data.user_ten = br_fx.iso_src(+) 

```

...means that you keep all the rows from br\_data, even if they don't have matches in the other rows. That would be like using RIGHT JOIN in the first query.

In fact, the WHERE clause removes any NULLs introduced by the LEFT JOIN, making your OUTER JOIN into an INNER join.

```
left outer join br_data 
ON (as_users.userid = br_data.last_note_user AND br_fx.iso_src = br_data.user_ten)
WHERE   br_data.state=3     

```

I'd really like you to let us know what you actually want from your query.

Is it this?

```
SELECT  bs_accts.acct_num,  
          bs_accts.acct_name,  
          br_data.record_id ,  
       as_users.username,   
       br_fx.fx_rate
FROM  
   br_data
   join
   bs_accts 
      on (br_data.acct_id  = bs_accts.acct_id) 
      AND (bs_accts.acct_currency='SHS')        
      AND substr(bs_accts.acct_num,1,1)='T'
      AND br_data.state=3       
   LEFT JOIN
   as_users
      ON br_data.last_note_user=as_users.userid
   LEFT JOIN
   br_fx
      ON br_data.user_ten = br_fx.iso_src
      AND br_fx.iso_dst = 'USD';

```

...where you want br\_data and bs\_accts joined (on all those different things), and then hooking into as\_users and br\_fx, but not eliminating anything from the join of br\_data and bs\_accts?

Rob