Forums

This topic is locked

Seperating data

Posted 24 Oct 2006 09:16:17
1
has voted
24 Oct 2006 09:16:17 Dan Stoll posted:
Ok I'm a classic point and click user.... So what I'm trying to do just isn't playing the game...

I have a recordset
<pre id=code><font face=courier size=2 id=code>
&lt;%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "0"
If (Request.Form("product" &lt;&gt; "" Then
Recordset1__MMColParam = Request.Form("product"
End If
%&gt;
&lt;%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows

Set Recordset1_cmd = Server.CreateObject ("ADODB.Command"
Recordset1_cmd.ActiveConnection = MM_CFS_STRING
Recordset1_cmd.CommandText = "SELECT product, branch, supplier, soh FROM EMMG.IDB WHERE product LIKE ? ORDER BY product ASC, branch, soh"
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 20, Recordset1__MMColParam + "%" ' adVarChar

Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%&gt;</font id=code></pre id=code>

What I want to be able to do is group the 'product', then have in seperate coloums the 'soh' value of the indivdual 'branch'

Branch values are 01, 02, 03, 04, 07

where the 'product' doesn't exsist at 'branch' display a '0'

I'm totally lost with this..

Reply to this topic