Monday, October 27, 2014

Find a specific Column in SQL Database without knowing the table(s)

From time to time, you may desire to identify the various tables in the GP which contain a particular field (column). There are sites on the web which can help you in this task and the Dynamics GP SDK Software Development Kit. Neither of these resources is specific to your GP deployment.  You may have customizations, third party products, etc.  The following queries can help you identify all of the locations of a particular field base on all or part of a particular field name.


--FIND A SPECIFIC COLUMN

SELECT name FROM sysobjects WHERE id IN ( SELECT id FROM syscolumns WHERE name = 'JRNENTRY' )
order by name

--FIND A PART OF COLUMN


SELECT name FROM sysobjects WHERE id IN ( SELECT id FROM syscolumns WHERE name like '%SOP%' )

No comments:

Post a Comment