Hello. Below I have some SQL code that is simple to select some data that I need. I have specified a specific value. I need to create some ASP code that would allow a user to enter any 'Sold-to' number and would then receieve the display count. I'm confused on how to set up the ASP to be able to search the table based on any 'Sold-to' number someone chooses. Please let me know of any ideas. Thanks so much.
SELECT DISTINCT
SOLDTO,
PAGENAME, COUNT(PAGENAME) AS 'PAGE-COUNT'
FROM DBO.STATS
WHERE SOLDTO=17890
GROUP BY SOLDTO, PAGENAME
ORDER BY (SOLDTO) ASC, ('PAGE-COUNT') DESC
SELECT DISTINCT
SOLDTO,
PAGENAME, COUNT(PAGENAME) AS 'PAGE-COUNT'
FROM DBO.STATS
WHERE SOLDTO=17890
GROUP BY SOLDTO, PAGENAME
ORDER BY (SOLDTO) ASC, ('PAGE-COUNT') DESC