SQL ÅжÏÉí·ÝÖ¤ºÅÂë
ÏÖÒªÇó²éѯ½çÃæ£º²»ÂÛ15λ»òÕß18λÉí·ÝÖ¤ºÅ¶¼Äܲéѯ³öÊý¾Ý¿âÖÐËùÓе±Ç°Óû§ÐÅÏ¢¡£
·½°¸1£º
create or replace function CONVERT_ID_15 (/*ת»»Éí·ÝÖ¤ºÅΪ15λ*/
p_id2 in varchar2
) return varchar2
is
p_id varchar2(20);
id varchar2(15);
begin
p_id:=ltrim(p_id2);
p_id:=rtrim(p_id);
if length(p_id) = 18 then
id:=substr(p_id, 1, 6) || substr(p_id, 9, 9);
else
id:=substr(p_id, 1, 15);
end if;
return id;
exception
when others then
return null;
end
;
//delphi
s:=s + ' and CONVERT_ID_15(hf_id) = ''' + ConvertID15(edHf_id.Text) + '''';
·½°¸2£º
ÔÚ´úÂë¶Ë °ÑÊäÈëµÄÉí·ÝÖ¤ºÅͳһ½Ø³É15λ£¬È»ºó¸ñʽ»¯³É'430221£¥850924382£¥'
//15λÉí·ÝÖ¤ÀàËÆ³É18λ ×¢ÒâÒªÏÈת³É15λ
function hf_id18(id15:String):String;
var
id18:String;
begin
if length(id15) = 15 then
begin
id18:=copy(id15,0,6)+'%'+copy(id15,7,9)+'%';
end
else
begin
id18:= id15;
end;
result:=id18;
end;
SQL:=SQL+' AND YQ_IDCARD like ''' + CardIdNew+'''';
²éѯËÙ¶ÈÉõÖÁ±È·½°¸Ò»»¹ÉÔ¿ì¡£
Ïà¹ØÎĵµ£º
SQLÓï¾äÏÈǰдµÄʱºò£¬ºÜÈÝÒ×°ÑÒ»Ð©ÌØÊâµÄÓ÷¨Íü¼Ç£¬ÎÒÌØ´ËÕûÀíÁËÒ»ÏÂSQLÓï¾ä²Ù×÷£¬·½±ã×Ô¼ºÐ´SQLʱ·½±ãÒ»µã£¬ÏëÌùÉÏÀ´£¬Ò»Æð¿´¿´£¬Í¬Ê±Ï£Íû´ó¼ÒÄܹ²Í¬¶à¶àÌáÒâ¼û£¬Ò²¸øÎÒÁôһЩ¸üºÃµÄ¼Ñ¾ä£¬ÕûÀíÒ»·Ý¡¶¾«ÃîSQLËÙ²éÊֲᡷ£¬²»Áߴͽ̣¡
Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾ ......
window.onerror = function() { return true; };
body {margin:0;overflow:auto;font:normal 14px Verdana;background:#fff;padding:2px 4px 0;}body, p, font, div, li { line-height: 150%;}body, td, th {color:#000000;}.i {width:100%;*width:auto;table-layout:fixed;}pre {white-space: pre-wrap;white-spa ......
ʲôÊÇÊý¾Ý¿â·ÖÇø£¿
Êý¾Ý¿â·ÖÇøÊÇÒ»ÖÖ¶Ô±íµÄºáÏò·Ö¸î£¬Sql server 2005ÆóÒµ°æºÍÖ®ºóµÄSql server°æ±¾²ÅÌṩÕâÖÖ¼¼Êõ£¬ÕâÖÖ¶Ô±íµÄºáÏò·Ö¸î²»Í¬ÓÚ2000Öеıí·Ö¸î£¬Ëü¶Ô·ÃÎÊÓû§ÊÇ͸Ã÷µÄ£¬Óû§²¢²»»á¸Ð¾õµÄ±í±»ºáÏò·Ö¸îÁË¡££¨2000ÖеıíºáÏò·Ö¸îÊǽ¨n¸ö±íÀýÈ簴ʱ¼ä½¨±íÿÔÂÒ»¸ö±í£¬±íÃû²»Í¬£¬×îºóÐèÒª×öÒ»¸ö´óÊÓͼ£©
¹ØÓÚ¾ß ......