Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

ISQL iNFORMIX Code Runnin for 10 minutes

$
0
0
I am running the below code and it does work but it is taking almost 10 minutes to run. The profit_c_acct_gal field is unique to the prft_ctr in the adjoining column but there are multiple entries for it. When I ran this with out the max() i kept getting a duplicate column error. Any input?
SQL
databasefactor;updateg_fuel_prftsetdest_cust=(selectmax(profit_c_acct_gal)lfromg_dlr_mstrwhereprft_ctr=g_fuel_prft.prft_ctranddest_cust=0andprofit_c_acct_galISNOTNULL)whereexists(select1fromg_dlr_mstrl2whereprft_ctr=g_fuel_prft.prft_ctranddest_cust=0andprofit_c_acct_galISNOTNULL)

Viewing all articles
Browse latest Browse all 4871

Trending Articles



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