IF NOT EXISTS(SELECT * FROM Reports.dbo.rbField WHERE TableName = 'Drugh' AND FieldName = 'PrescriptionId')
INSERT INTO Reports.dbo.rbField(TableName,FieldName,FieldAlias,Selectable, Searchable, Sortable, DataType,AutoSearch, Mandatory)
VALUES('Drugh', 'PrescriptionId', 'PrescriptionId', 'T', 'T', 'T', 'dtString', 'F','F')

IF NOT EXISTS(SELECT * FROM Reports.dbo.rbField WHERE TableName = 'Drughavaleh' AND FieldName = 'Autoid')
INSERT INTO Reports.dbo.rbField(TableName,FieldName,FieldAlias,Selectable, Searchable, Sortable, DataType,AutoSearch, Mandatory)
VALUES('Drughavaleh', 'Autoid', 'Autoid', 'T', 'T', 'T', 'dtInteger', 'F','F')