I need to write a query that selects TableID (a previously concatenated string) and also selects a substring of TableID as another column. All data in TableID is in the format %System.Variable, %Class.User, etc. I need to select from the % to the '.' to return something like %System and %Class respectively. Any suggestions?

Got it working!
substring(TableId,1,charindex('.',TableId)-1) AS Package,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.