Denne side indeholder artikler med forskellige perspektiver på Identity & Access Management i private og offentlige organisationer. Artiklerne behandler aktuelle IAM-emner og leveres af producenter, rådgivere og implementeringspartnere.
<% Set rs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM bbstopic WHERE categorytarget =" & ID & " ORDER BY lastedit;" rs.Open strSQL, Conn %>
mener du strSQL = "SELECT bbstopic.ID,bbstopic.topic,COUNT(*) from bbstopic,bbsreply WHERE bbstopic.topic=bbsreply.targettopicID GROUP BY bbstopic.ID";"
strSQL = "SELECT bbstopic.ID AS id,bbstopic.topic AS topic,COUNT(*) AS cnt FROM bbstopic,bbsreply WHERE bbstopic.topic=bbsreply.targettopicID GROUP BY bbstopic.ID";"
Fejltype: Der opstod en Microsoft VBScript-kompileringsfejl (0x800A0401) Slut på sætning var ventet /category.asp, line 43, column 163 strSQL = "SELECT bbstopic.ID AS id,bbstopic.topic AS topic,COUNT(*) AS cnt FROM bbstopic,bbsreply WHERE bbstopic.topic=bbsreply.targettopicID GROUP BY bbstopic.ID";"
strSQL = "SELECT bbstopic.ID AS id,bbstopic.topic AS topic,COUNT(*) AS cnt FROM bbstopic,bbsreply WHERE bbstopic.topic=bbsreply.targettopicID GROUP BY bbstopic.ID";"
Et " for meget i slutningen, rite? ;)
strSQL = "SELECT bbstopic.ID AS id,bbstopic.topic AS topic,COUNT(*) AS cnt FROM bbstopic,bbsreply WHERE bbstopic.topic=bbsreply.targettopicID GROUP BY bbstopic.ID;"
Så får jeg denne fejl:
Fejltype: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access-driver] Du har forsøgt at køre en forespørgsel, der ikke medtager det angivne udtryk "topic" som en del af en aggregatfunktion. /category.asp, line 44
strSQL = "SELECT bbstopic.ID AS id,bbstopic.topic AS topic,COUNT(*) AS cnt FROM bbstopic,bbsreply WHERE bbstopic.topic=bbsreply.targettopicID GROUP BY bbstopic.ID,bbstopic.topic ;"
Fejltype: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access-driver] Datatyper i JOIN-udtrykket stemmer ikke overens. /category.asp, line 44
strSQL = "SELECT bbstopic.ID AS id,bbstopic.topic AS topic,COUNT(*) AS cnt FROM bbstopic,bbsreply WHERE bbstopic.id=bbsreply.targettopicID GROUP BY bbstopic.ID,bbstopic.topic ;"
Den virker, arne, men så får jeg straks fejl i <a href="topic.asp?ID=<%=RS("ID")%>"><%=RS("topic")%></a> <%=RS("date")%> <%=RS("lastedit")%><br>
Fejltype: ADODB.Recordset (0x800A0CC1) Elementet kan ikke findes i den samling, der svarer til det anmodede navn eller ordenstal. /category.asp, line 56
strSQL = "SELECT bbstopic.ID AS id,bbstopic.topic AS topic,COUNT(*) AS cnt,MAX(bbstopic.date) AS date,MAX(bbstopic.lastedit) AS lastedit FROM bbstopic,bbsreply WHERE bbstopic.id=bbsreply.targettopicID GROUP BY bbstopic.ID,bbstopic.topic ;"
Det virker, arne.. skal bare ha' det til at virke med resten af sitet :). Accepterer det som svar - kan du forklare:
strSQL = "SELECT bbstopic.ID AS id,bbstopic.topic AS topic,COUNT(*) AS cnt FROM bbstopic,bbsreply WHERE bbstopic.id=bbsreply.targettopicID GROUP BY bbstopic.ID,bbstopic.topic ;"
Præcist hvad du gør? :) Og bare lad det være svar for nu.
count tæller antal max tager største værdi groub by tager count og max for hver værdi af de felter man laver group by på noget as xxx tager noget som et felt ved navn xxxx
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.