I have 2 search functions written in ASP that call from different fields in a SQL 7 database. One is an item number search and the other is a basic "like" query. I am now trying to merge the 2 so I have one big search feature. The problem I am having is nesting the 2 SQL statements. It seems that everything I try does not work. As you can see from the code below, these 2 statements are somewhat different. The basic query has a restriction based off of a parent item so it will not return anything that has a parent item. If anyone has any thoughts on this, please let me know....
Thanks in advance!
// item number search
SELECT NO, DESCRIPTION, WEBNAME, UNITPRICE
FROM SHOP_ITEM
WHERE NO LIKE '%" & Request.Form("searchvalue"
& "%'
ORDER BY NO"
// Basic Query
SELECT NO, DESCRIPTION, WEBNAME, UNITPRICE
FROM SHOP_ITEM
WHERE WEBDESCRIPTION LIKE '%" & Request.Form("searchvalue"
& "%' AND PARENTITEM = ' '
ORDER BY NO"
Thanks in advance!
// item number search
SELECT NO, DESCRIPTION, WEBNAME, UNITPRICE
FROM SHOP_ITEM
WHERE NO LIKE '%" & Request.Form("searchvalue"
ORDER BY NO"
// Basic Query
SELECT NO, DESCRIPTION, WEBNAME, UNITPRICE
FROM SHOP_ITEM
WHERE WEBDESCRIPTION LIKE '%" & Request.Form("searchvalue"
ORDER BY NO"