I'm fairly new to SQL and I ran into an Ambiguous column name error. Here's the error I received on my AJAX request:
<font face="Arial" size=2>
<p>Microsoft OLE DB Provider for SQL Server</font> <font face="Arial" size=2>error '80040e14'</font>
<font face="Arial" size=2>Ambiguous column name 'voltage'.</font>
<font face="Arial" size=2>/common/ver7/usmanajax_search_ver7.asp</font><font face="Arial" size=2>, line 135</font>
I was trying to run the following query:
whereStrSql=" left join excludedproducts E on (E.storeid=" & Session("StoreID") & " and E.id=P2.id) "
whereStrSql=whereStrSql & " where " & strsql
strsql="select P2.voltage,V.voltage voltage2,count(*) as KOL"
strsql=strsql & " from Lights_America..temp_products P2 "
strsql=strsql & " left join voltage V on (P2.voltage=V.id)"
strsql=strsql & whereStrSql
strSql=strSql & " group by P2.voltage,V.voltage"
strSql=strSql & " order by voltage2"
Any help would be greatly appreciated. Thanks in advance.