Guest User

Untitled

a guest
Aug 20th, 2019
122
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PredString = '99'
  2.  
  3. conn = pymssql.connect(server="MyServer", database="MyDB", port="1433", user="****", password="******")
  4. dfUpdate = pd.read_sql("EXEC UpdatePredictions '" + PredString + "'", conn)
  5. conn.close()
  6.  
  7. print(dfUpdate)
  8.  
  9. alter procedure UpdatePredictions (@PredString varchar(max)) as
  10. begin
  11.  
  12. update MyTable set PredMths = @PredString
  13.  
  14. select 'Updated.'
  15.  
  16. end
  17.  
  18. EXEC UpdatePredictions '99'
RAW Paste Data