![]() |
| |||||||
![]() |
| | LinkBack | Thread Tools | Display Modes |
| Sponsored Links |
| ||||
| well ... this would all depend on how the data is in the database to see if it can be ordered that way ... so that it can be displayed. otherwise you may have to put the recordset into an array then look at using a disconnected recordset to order it. we really need more information on your table layout along with the data that is currently in the column where you're getting "ready" & "repair"
__________________ Quote of the Month: Strife: As long as we have each other, we'll never run out of problems. Questions to Ponder: I went to a bookstore and asked the saleswoman where the self-help section was and she said if she told me, it would defeat the purpose. iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright © 2008 sbenj69 |
| ||||
| Thanks for the reply Mehere! ![]() Here is the view i'm using: Code: SELECT dbo.tblEQStatus.RegionID, dbo.tblEQStatus.ToolID, dbo.tblEQStatus.DistrictID, dbo.tblEQStatus.EQStatus, dbo.tblEQStatus.TrackingStatus,
dbo.tblEQStatus.EQNumber, dbo.tblEQStatus.Loc, dbo.tblEQStatus.CurrCC, dbo.tblTools.Tools, dbo.tblRegion.RegionName,
dbo.tblDistricts.District_Location
FROM dbo.tblTools RIGHT OUTER JOIN
dbo.tblEQStatus INNER JOIN
dbo.tblDistricts INNER JOIN
dbo.tblRegion ON dbo.tblDistricts.RegionID = dbo.tblRegion.RegionID ON dbo.tblEQStatus.DistrictID = dbo.tblDistricts.DistrictID ON
dbo.tblTools.ToolID = dbo.tblEQStatus.ToolID
WHERE (dbo.tblEQStatus.Loc LIKE '%ready%') OR
(dbo.tblEQStatus.Loc LIKE '%repair%') Region ---AB-Repair--Tools---EQNumber ---AB-Repair--Tools---EQNumber ---AB-Ready--Tools---EQNumber ---DU-Repair--Tools---EQNumber ---EH-Ready--Tools---EQNumber Next Region Etc. The LOC field contains hyphens (AB-Repair) I didn't know if there was a way to use an if statement with code below to say if LOC contains ready then show all the ready, then if repair show all the repair. Code: <TR>
<TD bgcolor=#ffe4e1 align=right><%=rs("Loc")%> </TD>
<TD align=center><%=rs("Tools")%> </TD>
<TD align=center><%=rs("CurrCC")%> </TD>
</TR> |
| ||||
| use an ORDER BY in your statement ... something like this Code: ORDER BY dbo.tblEQStatus.RegionID, SUBSTRING(dbo.tblEQStatus.Loc,CHARINDEX('-',dbo.tblEQStatus.Loc)+1,LEN(dbo.tblEQStatus.Loc)) |
| The Following User Says Thank You to mehere For This Useful Post: | ||
Rebelle (06-17-2008) | ||
| ||||
| while displaying the records ... check if it's ready or repair ... kinda like the way you're (i'm assuming) you're doing it for region ... something like this: Code: do while not rs.EOF
strLoc = rs("loc")
strType = MID(strLoc,inStr(strLoc,"-")+1,len(strLoc))
if strType <> prevType then
response.Write(strType & "<br />")
end if
response.Write(the rest of the data)
prevType = strType
rs.MoveNext
loop Last edited by mehere; 05-02-2008 at 01:13 PM. Reason: forgot a parenthesis |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| Sponsored Links |
| ASP.NET Resource Index a directory of ASP.NET tutorials, applications, scripts, assemblies and articles for the novice to professional developer. Free Web Directory Including Chats and Forums Resources, Offer automatic, instant and free directory submissions. | URLZ Web Directory URLZ Web Directory Free Web Directory - Add Your Link The Little Web Directory | Free Web Directory Pegasus free web directory is a free directory organised by categories. |