Board index » Web Programming » Variables in SQL 'WHERE' clause

Variables in SQL 'WHERE' clause

Web Programming276
I am trying to use the FP db results wizard custom SQL

feature to pass a variable as part of the where clause.



I am at a loss to find the correct syntax!



Any help, suggestions greatly appreciated.


-
 

Re:Variables in SQL 'WHERE' clause

If you are using the custom SQL - you might want to check out this site:

www.w3schools.com/sql/sql_where.asp">www.w3schools.com/sql/sql_where.asp



If you are trying to do this in the standard wizard - if you haven't seen

this option already, click the More Options button in step 3 (I believe) and

then the Criteria button of the DRW.



--

Tiffany K. Edmonds

-----------------------------

Microsoft MVP - FrontPage

www.dynamite-it.com

www.at-frontpage.com

www.anyfrontpage.com





"George M" <gmccombe@ad-page.com>wrote in message

Quote
I am trying to use the FP db results wizard custom SQL

feature to pass a variable as part of the where clause.



I am at a loss to find the correct syntax!



Any help, suggestions greatly appreciated.











-

Re:Variables in SQL 'WHERE' clause

Exactly my point.



If you use More Options in Step 3, how do you enter a

variable in the value field?



Quote
-----Original Message-----

If you are using the custom SQL - you might want to

check out this site:

www.w3schools.com/sql/sql_where.asp">www.w3schools.com/sql/sql_where.asp



If you are trying to do this in the standard wizard - if

you haven't seen

this option already, click the More Options button in

step 3 (I believe) and

then the Criteria button of the DRW.



--

Tiffany K. Edmonds

-----------------------------

Microsoft MVP - FrontPage

www.dynamite-it.com

www.at-frontpage.com

www.anyfrontpage.com





"George M" <gmccombe@ad-page.com>wrote in message

news:2c3501c36ecc$aed8bf90$3501280a@phx.gbl...

>I am trying to use the FP db results wizard custom SQL

>feature to pass a variable as part of the where clause.

>

>I am at a loss to find the correct syntax!

>

>Any help, suggestions greatly appreciated.

>

>

>





.



-

Re:Variables in SQL 'WHERE' clause

Hi George,



The double colon is used as the delimiter for form field names. For example

if I wish to replace the where clause in a SQL Statement then I would use.



Select * from mytable ::WhereClause::



Then in HTML, say a drop down selection box, I could have



<select name="WhereClause">

<option value="">All </option>

<option value="Where name = 'Mike'">All Mikes<option>

<option value="Where zip like '515*' ">Zip codes starting with

515</option>

</select>



--

Mike -- FrontPage MVP '97-'02

J-Bots Plus 2002 End of Summer Sale You Save $20.00

www.websunlimited.com">www.websunlimited.com

FrontPage Add-ins Since '97 2003 / 2002 / 2000 Compatible

----------------------------------------------------------------------------

--------------------

If you think I'm doing a good job, let MS know at mvpga@microsoft.com



"George M" <gmccombe@ad-page.com>wrote in message

Quote
I am trying to use the FP db results wizard custom SQL

feature to pass a variable as part of the where clause.



I am at a loss to find the correct syntax!



Any help, suggestions greatly appreciated.











-