declare @Colcunt int;
Select @Colcunt = count(*)
from tbl_Calibration_Transaction
where CardId = @CardId and ScalingMachine= @ScalingMachine
IF (@Colcunt = 0 ) BEGIN INSERT INTO tbl_Calibration_Transaction ...
More Related Contents:
- Turning a Comma Separated string into individual rows
- Update a table using JOIN in SQL Server?
- Calculate running total / running balance
- When should I use semicolons in SQL Server?
- How to get Time from DateTime format in SQL?
- Parse JSON in TSQL
- Get size of all tables in database
- Fuzzy matching using T-SQL
- List of all index & index columns in SQL Server DB
- Why use a READ UNCOMMITTED isolation level?
- Replace duplicate spaces with a single space in T-SQL
- How much size “Null” value takes in SQL Server
- SQL Server: Isolation level leaks across pooled connections
- How do I use the CONCAT function in SQL Server 2008 R2?
- How can sanitation that escapes single quotes be defeated by SQL injection in SQL Server?
- How do I exclude Weekend days in a SQL Server query?
- EXEC sp_executesql with multiple parameters
- Preserving ORDER BY in SELECT INTO
- Select / Insert version of an Upsert: is there a design pattern for high concurrency?
- Can you call a webservice from TSQL code?
- How to add custom attributes to SQL connection string?
- Multiple Column Pivot in T-SQL
- Joining multiple tables returns NULL value
- Which join syntax is better?
- Compute MD5 hash of a UTF8 string
- LPAD in SQL Server 2008
- How to check SQL Server Database compatibility after sp_dbcmptlevel is deprecated?
- How do I remove non-breaking spaces from a column in SQL server?
- Is there an “IF EXISTS” test for a linked server?
- SQL Server stored procedure return code oddity