Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 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 June 24th, 2007, 11:04 AM
Authorized User
 
Join Date: Jun 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Jeff

Thank you for your reply

apple
 
Old June 25th, 2007, 04:59 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

After the loop has finished executing you will have this at the end of your string:

AND T1.A

and you need to trim that off as it will cause an error if you try to execute it.

Left() takes 2 arguments, the source string and an int value; basically it will return n number of characters from the left of the string up to n.

So:
Dim s
s = "foo"
Response.Write(Left(s, 1))
will output: f

Len() takes one parameter, a string, and returns an INT value of how many places exist in that string so
Len(s) will output 3

So my code: Left(sSqlLike, (Len(sSqlLike) - 10)) takes the source string and counts from the left most position to the end of the string, less 10 positions, as we need to remove the trailing 10 chars.

hth.



================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old June 26th, 2007, 10:01 AM
Authorized User
 
Join Date: Jun 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

dparsons,

 Appreciate with ur explanation. Thank you

apple





Similar Threads
Thread Thread Starter Forum Replies Last Post
Item Templates hbansal ASP.NET 1.0 and 1.1 Professional 6 August 2nd, 2007 06:24 AM
count item urbanaccess Access 1 January 16th, 2007 12:33 PM
Want Combo Box first item if only 1 item markw707 Access 3 June 9th, 2004 04:03 PM
Find Out First Item of each item Group Jane SQL Language 1 November 22nd, 2003 12:42 PM
? DataGrid Item [email protected] ASP.NET 1.0 and 1.1 Professional 0 November 18th, 2003 08:56 AM





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