Softnik Technologies - Business Strategy Software

Business Strategy Software

 
 
 

October 3, 2009

Watch My Domains ISP – SQL Query To List or Lookup Domains Based On Categories


If you have a lot of domain names managed through Watch My Domain ISP, you probably make use of domain categories to group them. 

Any domain category you create in Watch My Domains ISP is stored on the database using the following Boolean field name.

GRP_<category name>

For example, if you have a category called “Business Domains”, the corresponding field will be

GRP_Business Names

Any domain that belongs to “Business Domains” will have the above field value set to TRUE.

With the above information, you can construct SQL queries. Here is an example query that lists all domains that do not belong to the “Business Domains” category.

SELECT * FROM [Domains] WHERE ([GRP_Business Domains] <> 1 OR [GRP_Business Domains] IS NULL)

 You have to do the NULL check because the value may not be set for many domains.

You can also do multiple checks. The following will list all domains that do not belong to the “Business Domains” and “Important Domains”

SELECT * FROM [Domains] WHERE ([GRP_Business Domains] <> 1 OR [GRP_Business Domains] IS NULL)  AND  ([GRP_Important Domains] <> 1 OR  [GRP_Important Domains] IS NULL)

Other SQL Query and Domain Database Related Posts

You may want to try all or some of our domain name portfolio management related products at domainpunch.com. Thirty day free trial downloads are available for all the products.



Filed under: Application Notes,Domain and Site Management — admin @ 7:20 pm