Guest_imported
New member
- Jan 1, 1970
- 0
<br>
Hello, everyone! Yes, this is actaully a question, rather than an answer or tip! Here is the problem. I am using MSSQL 7 to lookup up information for clients, on the web. Everything works fine as far as it finiding the information and returning it to the client (based on the criteria the client establishes). However, there is just one little thing I can't seem to get to work no matter what I do. <br>
<br>
I would like to allow the customer to specify how the results are going to be ordered. I uses a SELECT with OPTIONS, and return the value ("order") to the idc. However, it seems no matter what I do, SQL just outputs the file in the same order... unless I specifically use an<br>
ORDER BY PO_NUM (Or whatever field I wasnt to order by). I guess my question is, Can you use a user variable to specify the ORDER BY operator, in the idc? <br>
<br>
Here is the idc file as it now stands. As I said everything works fine, BUT the Order By<br>
<br>
<br>
SQLStatement:<br>
+SELECT *<br>
+FROM BBWOPNPO<br>
+Where COMPANY LIKE '%Company%'<br>
+OR TT_NDC LIKE '%TT_NDC%'<br>
+OR PO_NUM LIKE '%PO_NUM%'<br>
+OR DEPT Like '%DEPT%'<br>
+OR BBW_SKU Like '%BBW_SKU%'<br>
+OR DES Like '%DES%'<br>
+ORDER BY '%Order%'<br>
<br>
And the HTML code to get the field (%Order%) is:<br>
<SELECT NAME="Order" SIZE="1"><br>
<OPTION VALUE="TT_NDC" SELECTED>TT_NDC<br>
<OPTION VALUE="PO_NUM">PO_NUM<br>
<OPTION VALUE="DEPT">DEPT<br>
<OPTION VALUE="BBW_SKU">BBW_SKU <br>
</SELECT><br>
<br>
<br>
(and the htx file, doesn't really matter)<br>
<br>
Any help here will be so greatly appreciated. The only way around this, that I can see, if I can't do it this way, is to write four seperate idc files, each one being basically the same, except for the ORDER BY, then call the correct idc based on the clients criteria, but this is sloppy and creates even MORE files to keep track of (like I don't have neough already)!
Hello, everyone! Yes, this is actaully a question, rather than an answer or tip! Here is the problem. I am using MSSQL 7 to lookup up information for clients, on the web. Everything works fine as far as it finiding the information and returning it to the client (based on the criteria the client establishes). However, there is just one little thing I can't seem to get to work no matter what I do. <br>
<br>
I would like to allow the customer to specify how the results are going to be ordered. I uses a SELECT with OPTIONS, and return the value ("order") to the idc. However, it seems no matter what I do, SQL just outputs the file in the same order... unless I specifically use an<br>
ORDER BY PO_NUM (Or whatever field I wasnt to order by). I guess my question is, Can you use a user variable to specify the ORDER BY operator, in the idc? <br>
<br>
Here is the idc file as it now stands. As I said everything works fine, BUT the Order By<br>
<br>
<br>
SQLStatement:<br>
+SELECT *<br>
+FROM BBWOPNPO<br>
+Where COMPANY LIKE '%Company%'<br>
+OR TT_NDC LIKE '%TT_NDC%'<br>
+OR PO_NUM LIKE '%PO_NUM%'<br>
+OR DEPT Like '%DEPT%'<br>
+OR BBW_SKU Like '%BBW_SKU%'<br>
+OR DES Like '%DES%'<br>
+ORDER BY '%Order%'<br>
<br>
And the HTML code to get the field (%Order%) is:<br>
<SELECT NAME="Order" SIZE="1"><br>
<OPTION VALUE="TT_NDC" SELECTED>TT_NDC<br>
<OPTION VALUE="PO_NUM">PO_NUM<br>
<OPTION VALUE="DEPT">DEPT<br>
<OPTION VALUE="BBW_SKU">BBW_SKU <br>
</SELECT><br>
<br>
<br>
(and the htx file, doesn't really matter)<br>
<br>
Any help here will be so greatly appreciated. The only way around this, that I can see, if I can't do it this way, is to write four seperate idc files, each one being basically the same, except for the ORDER BY, then call the correct idc based on the clients criteria, but this is sloppy and creates even MORE files to keep track of (like I don't have neough already)!