|
-
Feb 23rd, 2001, 10:53 AM
#1
Thread Starter
Lively Member
I'm trying to use a select top 10 or 25 or 50 T-SQL in VB...This code I wrote doesn't seem to do the job..can any experts help ..
sSQL = "Select Top " & Parameters("sReportValue") & ""
sSQL = sSQL & "DocumentName, HitCount "
sSQL = sSQL & "from RollupDocument, RollupLookupDocument "
sSQL = sSQL & "Where RollupType=" & iRollupType
sSQL = sSQL & " and RollupYear=" & iRollupYear
sSQL = sSQL & " and RollupValue=" & iRollupValue
sSQL = sSQL & " Order by Hitcount Desc"
lRet = objDB.FillRecordsetWeb(rsDetailedHits, sSQL)
can I use an else if statemnet within sSQL...where it says select top ..either top 10 or 25 or 50?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|