Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 26th, 2003, 03:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default how % sign use in asp

following query give error in % sign
How can use % sign in asp ?

ssql="select drawings.date_recd,drawings.date_revd,drawings.dty pe,sectors.sect_area,sectors.sect_count,drawings.n ame from drawings,sectors where drawings.name=sectors.name and drawings.dtype like ('"%&p&%"') and sectors.sect_area like ('"%&u&%"') and sectors.sect_count like ('"%&sect_count&%"') "


Mateen
 
Old July 28th, 2003, 04:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

only the variables p, u and sect_count need to be outside the string, not the % signs:
Code:
ssql="select drawings.date_recd,drawings.date_revd,drawings.dtype,sectors.sect_area,sectors.sect_count,drawings.name from drawings,sectors where drawings.name=sectors.name and drawings.dtype like ('%"&p&"%') and sectors.sect_area like ('%"&u&"%') and sectors.sect_count like ('%"&sect_count&"%') "
 
Old July 28th, 2003, 06:56 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks


Quote:
quote:Originally posted by pgtips
 only the variables p, u and sect_count need to be outside the string, not the % signs:
Code:
ssql="select drawings.date_recd,drawings.date_revd,drawings.dtype,sectors.sect_area,sectors.sect_count,drawings.name from drawings,sectors where drawings.name=sectors.name and drawings.dtype like ('%"&p&"%') and sectors.sect_area like ('%"&u&"%') and sectors.sect_count like ('%"&sect_count&"%') "





Similar Threads
Thread Thread Starter Forum Replies Last Post
How use plus sign ajabbabahalmigiriha C# 1 December 19th, 2006 01:04 AM
SIGN OUT PROBLEMS.. sarah lee ASP.NET 1.0 and 1.1 Basics 2 October 26th, 2006 10:27 AM
The little "plus" sign janise Access 8 January 6th, 2005 10:10 AM
How do you know which page to go to after sign up bekim Classic ASP Basics 8 August 22nd, 2004 07:53 PM
Is it possible to sign a VBScript - Need help ssudhaiyer VBScript 1 September 5th, 2003 05:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.