如何使用SQL命令数据库专家

时间:2016-01-23 13:05:37

标签: c# sql-server c#-4.0 crystal-reports

我想通过从~To中选择日期来生成报告,并希望将这些值传递给在查询结尾处写入的变量x和y

SELECT accounts.invoice, tempClient.name, tempClient.businessName,
tempClient.contactNumber,accounts.total, accounts.remaining
FROM accounts
INNER JOIN tempClient
ON accounts.clientCode = tempClient.id where accounts.[dateTime] between ?x and ?y

Like This and try to save

但它给了我错误

Please Help Thanks

1 个答案:

答案 0 :(得分:1)

请参阅SQL命令右侧空白的“参数列表”框?您想在那里创建参数。此外,当您引用它们时,您希望使用大括号来执行它:{?x}