Query to mass create job numbers

Use this query to mass create job numbers: Insert Into [Job] ([DBId], [Id], [Number], [ClientId], [JobTypeId], [DivisionId], [Description], [Actif], [Archive], [JobServiceTRRestriction], [StartDate], [EndDate], [Chargeable], [Status], [TRLockType],...

Query: Useful Query Examples

Where condition with upper/lower case consideration: Select * from Document where StrComp(Extension, “.PDF”, 0) = 0    

Query: VersionLink Queries

1) Select Environment, count(*) from VersionLink Group by Environment 2) Select Environment, count(*) from VersionLink where not Environment = ‘Your Environment’ Group by Environment 3) Select * from VersionLink where not Environment =...

Query to display triggers on Sql Server

List the existing triggers: Select * from sysobjects where type = ‘TR’  order by Name Specififc Trigger Select Text from syscomments where Text like ‘%CompanyPerson%’

Query: How to drop a field

To drop a field from a specific table, do the following: Open Microsoft Sql Server Management Studio Connect to the desired database and create a new query Paste the following in the window: ALTER TABLE [TableName] DROP COLUMN [ColumnName] Execute the...