我有一个表,用于存储员工的“ id”值。现在,我需要从该表中编写一个Select,并将该雇员的Name和Surname串联在一起。当我从同一架构进行串联时,此选择正常运行:
#include <iostream>
但是,当我从不同的架构连接相同类型的数据(也具有相同的列类型和名称)时,我在“ u.ID”中收到“无效编号” 错误:
$.validator.addMethod("myMethod", function(value, element) {
return value.match(/^\d\d?\/\d\d?\/\d\d\d\d$/);
}, "Please, bla bla bla");
$(function() {
$("#my_form").validate({
onfocusout: false,
onkeyup: false,
onclick: false,
rules: {
datepicker: {
myMethod: true,
},
timepicker: {
required: true,
remote: {
url: "check_hour.php",
type: "post",
data: {
name: function() {
return $("#name").val();
},
hour: function() {
return $("#hour").val();
}
}
}
},
action: "required"
},
messages: {
datepicker: {
required: "Bla bla bla",
},
timepicker: {
required: "Bla bla bla",
remote: "Bla bla bla",
},
action: "Please provide some data"
}
});
});
</script>
为什么在两种情况下Select都不一样,而2nd Select应该是什么样? 谢谢您提前的帮助!
答案 0 :(得分:1)
对不起,我的第二个糟糕的架构具有Varchar2类型,而我的架构中具有Number类型。 To_Char解决了我的问题:
SELECT NAME || ' ' || SURNAME "Employee"
FROM Schema1.Table1
LEFT JOIN Schema2.Table2 u
ON to_char(Manager) = u.ID
ORDER BY ID.Table1;