我试过以下:
Select Case Combo1.SelectedItem Or Combo2.SelectedItem
Run Code Online (Sandbox Code Playgroud)
但我得到错误:
Conversion from String "string here" to type 'Long' is not valid
Run Code Online (Sandbox Code Playgroud)
是否可以有多个选择案例?
有人可以告诉我哪种方式更好,它们都能产生相同的结果,但哪种更"正确"?
我个人认为第一个查询更容易阅读,但我似乎在其他地方读到应该总是使用别名.
谢谢
SELECT Patient.PatientSurname, Doctor.DoctorSurname
FROM Patient
JOIN Operation
ON Operation.PatientCode=Patient.PatientCode
JOIN Doctor
ON Doctor.DoctorCode=Operation.DoctorCode
WHERE Operation.OperationType='Broken Arm'
GROUP BY Patient.PatientSurname
HAVING count(Patient.PatientSurname) > 0
SELECT PatientSurname, DoctorSurname
FROM Patient as p, Operation as o, Doctor as d
WHERE o.PatientCode=p.PatientCode
AND d.DoctorCode=o.DoctorCode
AND o.OperationType='Broken Arm'
GROUP BY p.PatientSurname
HAVING count(p.PatientSurname) > 0
Run Code Online (Sandbox Code Playgroud) 我试图自学Java并开始浏览BlueJ示例.
在手术系统的情况下,我需要将患者及其地址添加到阵列中,然后能够添加患者然后列出患者.
该示例使用向量和硬代码向向量添加名称,但我想使用数组并允许用户向数组添加名称和地址.
谁能提供一些指导?
我有以下但不知道从哪里开始.
public class Patient
{
public String name;
public String address;
public Patient(String n, String a) {
name = n;
address = a;
}
}
Run Code Online (Sandbox Code Playgroud)