Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 将数据库值与sql server中的外部值进行比较_Sql Server_Database_Select_Compare - Fatal编程技术网

Sql server 将数据库值与sql server中的外部值进行比较

Sql server 将数据库值与sql server中的外部值进行比较,sql-server,database,select,compare,Sql Server,Database,Select,Compare,我有一个运行在SQL Server上的数据库。此外,我还有一个名为PDV_FINAL的表,其中包含“Nom_PDV,Pre_PDV,POS_ID,PHONE”,我想将PDV_FINAL.PHONE与手动给定的名为Caller_ID的值进行比较,并将PDV_FINAL显示到表单中。您可以使用下面的简单where条件来完成此操作 Select Nom_PDV, Pre_PDV, POS_ID, PHONE from PDV_FINAL where Phone = @yourcaller

我有一个运行在SQL Server上的数据库。此外,我还有一个名为PDV_FINAL的表,其中包含“Nom_PDV,Pre_PDV,POS_ID,PHONE”,我想将PDV_FINAL.PHONE与手动给定的名为Caller_ID的值进行比较,并将PDV_FINAL显示到表单中。

您可以使用下面的简单where条件来完成此操作

 Select Nom_PDV, Pre_PDV, POS_ID, PHONE from PDV_FINAL 
     where Phone = @yourcaller_id

您是否要求SQL查询
选择Nom_PDV、Pre_PDV、POS_ID、PHONE FROM PDV_FINAL,其中PHONE=@Caller_ID
?或者如何将数据绑定到表单中?