-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyhon_oracle.py
47 lines (39 loc) · 1000 Bytes
/
pyhon_oracle.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<<<<<<< HEAD
import cx_Oracle as o
from datetime import datetime
dsn = o.makedsn("localhost","1521")
con = o.connect(user="system", password="H9G26XZt",dsn=dsn)
c = con.cursor()
c.execute("select * from employee")
for row in c:
print(row[0])
t='2019/09/01 8:30:25'
s='VACANT'
i='python'
from datetime import datetime
t_object=datetime.strptime(t,'%Y/%m/%d %H:%M:%S')
print(t_object)
message =''
c.callproc('insertStatus',[t_object,s,i,message])
print(message)
c.close()
=======
import cx_Oracle as o
from datetime import datetime
dsn = o.makedsn("localhost","1521")
con = o.connect(user="system", password="H9G26XZt",dsn=dsn)
c = con.cursor()
c.execute("select * from employee")
for row in c:
print(row[0])
t='2019/09/01 8:30:25'
s='VACANT'
i='python'
from datetime import datetime
t_object=datetime.strptime(t,'%Y/%m/%d %H:%M:%S')
print(t_object)
message =''
c.callproc('insertStatus',[t_object,s,i,message])
print(message)
c.close()
>>>>>>> d01612cfc492baf620e4bee5f780b521ed926fe7