Y
yyk518
Unregistered / Unconfirmed
GUEST, unregistred user!
[]CREATE PROCEDURE [dbo].[ReturnMaxBillNumberOfStorage]
@Name VARCHAR(255),
@IsOut BIT
AS
IF @IsOut=0
SELECT MAX(CAST(RIGHT([v_rkdbh],9) AS INT)) FROM @Name
ELSE
SELECT MAX(CAST(RIGHT([v_ckdbh],9) AS INT)) FROM @Name
GO
@Name VARCHAR(255),
@IsOut BIT
AS
IF @IsOut=0
SELECT MAX(CAST(RIGHT([v_rkdbh],9) AS INT)) FROM @Name
ELSE
SELECT MAX(CAST(RIGHT([v_ckdbh],9) AS INT)) FROM @Name
GO