Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  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'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement