You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/word/新协航_设计文档/数据库建表文档/20131209/视图vcargo用于获取生成对账单所用的完税价格.sql

23 lines
504 B
Transact-SQL

/****** Object: View [dbo].[vImportcargo] Script Date: 12/13/2013 10:14:59 ******/
IF EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[vImportcargo]'))
DROP VIEW [dbo].[vImportcargo]
GO
/****** Object: View [dbo].[vImportcargo] Script Date: 12/13/2013 10:14:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create view [dbo].[vImportcargo]
as
select c.*,case when tax_amount <amount
then amount else tax_amount end gettaxamount from import_cargo c
GO