Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8419

Another SQLCMD Question

$
0
0

Hi,

 

I have this SQLCMD:

 

SQLCMD -S <servername> -d <db_name> -U sa -P <password> -Q "set nocount on;SELECT T0.ItemCode,T0.FrgnName, T0.U_Brand, (SELECT T1.Price FROM OITM T0 inner join ITM1 T1 on T0.ItemCode = T1.ItemCode and T1.[PriceList] = '1'),T1.Price, T0.CodeBars, CASE WHEN T2.OnHand - T2.IsCommited > 10 THEN 'Y' ELSE 'N' END FROM OITM T0 inner join ITM1 T1 on T0.ItemCode = T1.ItemCode and T1.[PriceList] = '2' inner join OITW T2 on T0.ItemCode = T2.ItemCode and T2.WhsCode = '01. Main'" -s "," -o "\\path\test.csv" -h-1 -s"~" -W -w 999

 

But this doesn't seem to work...

 

The problem is with trying to get two Prices fields from 2 different pricelists... I have attempted this, but doesn't seem to work!

 

Any help would be appreciated.

 

Regards

Rick


Viewing all articles
Browse latest Browse all 8419

Trending Articles



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