我無法弄清楚如何在matlab中將日期傳遞給我的sql查詢。當我這樣做是 「靜態」,它workds非常清楚:將日期傳遞給matlab中的sql查詢
myquery1 = ['Select DeliveryMonth, Value '...
' FROM [mydatabase] '...
' where idcurve = 33 ' ...
' and deliverymonth <''20121130'' '...
' order by DeliveryMonth ']
但我想是這樣的:
breakdate = input('Enter a breakdate as 20121130: ', 's')
myquery1 = ['Select DeliveryMonth, Value '...
' FROM [mydatabase] '...
' where idcurve = 33 ' ...
' and deliverymonth < ''breakdate'' '...
' order by DeliveryMonth ']
問候 一個
對不起,不起作用。 ahve試過這個:'and deliverymonth'''''breakdate'''...它不會給出任何錯誤,但也不會返回任何數據... – oceanfront