Removing the first several characters from returns

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Have the following query

SELECT MSysQueries.Attribute, MSysQueries.Expression, MSysQueries.ObjectId
FROM MSysQueries
WHERE (((MSysQueries.Attribute)=6) AND ((MSysQueries.ObjectId)=-2147483572));

It returned the following results

Attribute Expression ObjectId
6 EmployeeTable.EmpID -2147483572
6 EmployeeTable.Name -2147483572
6 EmployeeTable.PkgKyoto -2147483572
6 EmployeeTable.PkgYork -2147483572
6 EmployeeTable.PkgTam -2147483572
6 EmployeeTable.PkgGima -2147483572

How can I remove the "EmployeeTable." text from the Expression results? I
want to see the following

Attribute Expression ObjectId
6 EmpID -2147483572
6 Name -2147483572
6 PkgKyoto -2147483572
6 PkgYork -2147483572
6 PkgTam -2147483572
6 PkgGima -2147483572
 
Ray,

You can use the LEFT or MID function to truncate a specific number of
characters off of your results.

Cathy
 
That worked... here is the SQL

SELECT MSysQueries.Attribute, MSysQueries.Expression, MSysQueries.ObjectId,
Mid([Expression],15,30) AS AbbrExpression
FROM MSysQueries
WHERE (((MSysQueries.Attribute)=6) AND ((MSysQueries.ObjectId)=-2147483572));

Thanks.
 
Back
Top