Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

SQLPLUS from Powershell

$
0
0

Hi,

I have a piece of sql code which I am running from powershell. The output is the count. If the count is greater than 10, I need to execute a command. Is there a way, I can modify my script so I can check if count is greater than 10.

Any Help will be greatly appreciated.

COUNT(*)                                                                     

----------                                                                     

         0  

sqlplus username/password@TnsAlias 'c:\path\to\DBscript.sql' | out-file 'c:\temp\sql-output.txt'

DBscript.sql
select count(*)
from pa_lane_txn a




Viewing all articles
Browse latest Browse all 15028

Latest Images

Trending Articles



Latest Images

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