Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter by URL parameter 1

Status
Not open for further replies.
Mar 17, 2005
147
US
I need to try and filter this query from a link in dreamweaver. its a Request.QueryString("id")

How would I do that?

SELECT a.aid, a.articletitle, a.shortdescrp, a.details, a.imagetitle, a.image, a.eventdate, a.datenow, count(c.aid) as commentCount
FROM articles a left join comments c on a.aid = c.aid group by a.aid, a.articletitle, a.shortdescrp, a.details, a.imagetitle, a.image, a.eventdate, a.datenow
 
Sounds like it's more of an asp question rather than SQL Server. You could try something like:
Code:
where <<whateverfieldyouwanttofilteron>> = request.querystring("id").value
or pass the URL parameter as a stored procedure parameter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top