Skip to content

tsqlt.DropClass can't deal with some special characters in class names #5

Open
@Prof-hu

Description

@Prof-hu

I had trouble with using DropClass while trying to figure out some standardized naming conventions for Class (test schema) names. The issue is there when there is a dot (ASCII 46) in the name.

Looking at the code of the procedure I noticed that when it is looking for the schema id, it uses SCHEMA_ID(@classname) everywhere, expect where it looks up the schema itself from sys.schemas. There it is using SCHEMA_ID(PARSENAME(@classname,1)). Not sure what's the goal with this, but once there's a dot in the Class name, PARSENAME will keep only the part after it, and SCHEMA_ID will not find the schema.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions