Quantcast
Channel: SCN : All Content - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 757

Table variables - bug or usage issue

$
0
0

When using table variables like this

 

declare @tab table

(

    PK char(8),

    Currency char(3)

)

 

update @tab

set Currency = s.Currency

from @tab p , s

where p.PK = s.PK

 

I get the message

      Ambiguous column name Currency

 

I've tried

     set p.Currency = s.Currency

 

Also,

 

     select p.Currency c1, s.Currency c2

     from @tab, s

 

 

gives 2 error messages

     Ambiguous column name Currency

 

 

What is going on ?

Is there a workaround.


Viewing all articles
Browse latest Browse all 757

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>