【发布时间】:2017-11-10 07:42:17
【问题描述】:
我有两列,BarcodeValuePLC 和 DateTime,来自 dbo.tablename。现在我想从BarcodeValuePLC 中搜索特定的条形码,该条形码应相对于 Desc DateTime 进行排序。
我想使用存储过程执行此操作并将其存在返回给 VB.NET。
【问题讨论】:
标签: sql-server vb.net stored-procedures
我有两列,BarcodeValuePLC 和 DateTime,来自 dbo.tablename。现在我想从BarcodeValuePLC 中搜索特定的条形码,该条形码应相对于 Desc DateTime 进行排序。
我想使用存储过程执行此操作并将其存在返回给 VB.NET。
【问题讨论】:
标签: sql-server vb.net stored-procedures
试试这个:
CREATE PROCEDURE ProcedureName
(
@BarCode VARCHAR(50)
)
AS
BEGIN
SELECT
*
FROM dbo.tablename
WHERE BarcodeValuePLC = @BarCode
ORDER BY [DateTime] DESC
END
【讨论】: