Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. dot = '.'
  2. cur.execute("SELECT results_stbs.tr_test_case_id, "
  3. "CONCAT(test_functionality.test_functionality_code,'{}' test_cases.test_case_no) AS 'Script_ID'"
  4. "FROM results_stbs "
  5. "JOIN tr_test_cases "
  6. "ON tr_test_cases.tr_test_case_id=results_stbs.tr_test_case_id "
  7. "JOIN test_cases "
  8. "ON test_cases.test_case_id=tr_test_cases.test_case_id "
  9. "JOIN test_case_functionalities "
  10. "ON test_cases.test_case_id = test_case_functionalities.test_case_id "
  11. "JOIN test_functionality "
  12. "ON test_functionality.test_functionality_id = test_case_functionalities.test_functionality_id "
  13. "WHERE tr_test_cases.tr_test_case_id = '{}' "
  14. ) .format(dot, str(tr_test_case_id))
  15.  
  16. script_id = cur.fetchall()[0][0]
  17.  
  18. print "The script id is: ", script_id
  19.  
  20. Traceback (most recent call last):
  21.  
  22.  
  23. File "index.py", line 185, in <module>
  24. main()
  25. File "index.py", line 90, in main
  26. cur.execute("SELECT results_stbs.tr_test_case_id, "
  27. File "C:Python27Libsite-packagesMySQLdbcursors.py", line 205, in execute
  28. self.errorhandler(self, exc, value)
  29. File "C:Python27Libsite-packagesMySQLdbconnections.py", line 36, in defau
  30. lterrorhandler
  31. raise errorclass, errorvalue
  32. _mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax
  33. ; check the manual that corresponds to your MySQL server version for the right s
  34. yntax to use near '.test_case_no) AS 'Script_ID'FROM results_stbs JOIN tr_test_c
  35. ases ON tr_test_cas' at line 1")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement