+254 722 615 477 | +254 729 844 384 | +254 722 954 501 info@gravitysolutions.net

Summary

Searching for / finding all table names where a certain MS SQL Sage 200 Evolution database field is used.

Description

This article explains how to search for all the table names where a certain MS SQL database field is used.

Resolution

Please note this article assumes you have a basic understanding of how to navigate within MS SQL Management Studio and how to run basic SQL queries. Therefore, please contact either your Evolution Business Partner (BP) or Evolution Support for further assistance if needed.

To explain further we’ll make use of the following scenario:

In this example we will be looking for all Sage Evolution database tables that include a field name called ‘last’ or anything similar.

The intention is to find all associated table names and the exact field name/s of your search field name = last

Therefore, run the SQL script below on your company database. Only change the key search word in the bottom line of the script below to last in this case.

Also note to enable the search, the SQL script is using the wild card search % symbols as can be seen below.

SELECT c.name AS ‘Fieldname’

,t.name AS ‘Tablename’

FROM sys.columns c

JOIN sys.tables t ON c.object_id = t.object_id

WHERE c.name LIKE ‘%last%’

When the SQL script is executed, the results below indicate all the tables where the search field name of last is found in, as well as the actual field name per table.

Image
Get Free Resources !

Get Free Resources !

Enter Your Details to get access to these resources Free of charge

Resource Access

Thank you! Check you email to access these Resources and More

Let's Chat
1
Your voice matters! Join the chat
Don't be a lurker! Dive in and join the vibrant chat happening right now.