Learn how to use the SQL Server to add a new type of grating in the database.
To add a new type of grating:
The following is an example of such a query:
USE [C:\PROGRAMDATA\AUTODESK\ADVANCE STEEL 2018\USA\STEEL\DATA\ASTORGRATINGS.MDF]
GO
-- Create table structure
CREATE TABLE [dbo].[CUSTOM_GRATING](
[Name] [nvarchar](255) NOT NULL,
[RunName] [nvarchar](64) NULL,
[Length] [float] NULL,
[Width] [float] NULL,
[Thickness] [float] NULL,
[Hatch] [nvarchar](255) NULL,
[ConnectorName] [nvarchar](64) NULL,
[ConnectorQuantity] [int] NULL,
[Material] [nvarchar](255) NULL,
[Coating] [nvarchar](255) NULL,
[Weight] [float] NULL,
[OwnerText] [nvarchar](15) NULL,
CONSTRAINT [PK_CUSTOM_GRATING] PRIMARY KEY CLUSTERED ([Name]))
GO
-- Copy all data from an existing table
INSERT INTO [dbo].[CUSTOM_GRATING]
SELECT * FROM [dbo].[Amico_Standard_ExpandedMetal_AlFlat]
GO
-- Bulk replace RunName values from the original table
UPDATE [dbo].[CUSTOM_GRATING]
SET [RunName] = REPLACE([RunName], 'Amico Expanded Al', 'Custom grating')
WHERE [RunName] LIKE 'Amico Expanded Al%'
GO
-- Add CUSTOM_GRATING to GratingStandardMaster
INSERT INTO [dbo].[GratingStandardMaster]
VALUES ('CUSTOM_GRATING',
'Custom grating',
'CUSTOM_GRATING',
'Name',
'DSC')
GO