gpt4 book ai didi

asp.net - 查询表达式中的语法错误(缺少运算符) - ASP.NET

转载 作者:行者123 更新时间:2023-12-01 06:32:10 25 4
gpt4 key购买 nike

使用以下查询出现语法错误:

strSQL = "SELECT Customer.customer_No, Customer.customer_Name,
Appointment.appointment_No,Appointment.appointment_Date,
Appointment.start_Time, Appointment.end_Time
FROM Customer
INNER JOIN Vehicle
ON Customer.customer_No = Vehicle.customer_No
INNER JOIN Appointment
ON Vehicle.vehicle_Ref_No = Appointment.vehicle_Ref_No"

我在 SQL Server Management Studio 中尝试了相同的查询,它获取了我需要的数据。不确定问题是什么,任何帮助将不胜感激。

最佳答案

尝试这个 :

strSQL =@"SELECT Customer.customer_No, Customer.customer_Name,
Appointment.appointment_No,Appointment.appointment_Date,
Appointment.start_Time, Appointment.end_Time
FROM Customer
INNER JOIN Vehicle
ON Customer.customer_No = Vehicle.customer_No
INNER JOIN Appointment
ON Vehicle.vehicle_Ref_No = Appointment.vehicle_Ref_No"

@ 将允许您编写多行并使用转义字符。

关于asp.net - 查询表达式中的语法错误(缺少运算符) - ASP.NET,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19149795/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com