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 June 21st, 2003, 03:44 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default sql server syntax problem

Hi all,

Please send the example of following sql query.
I could not understand the syntax of sql query.
table name is project
table field is contractno, contractid,image



Mateen Martin
Old June 21st, 2003, 09:36 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi Mateen,

What is it you need to do? What exactly is your question?

If you need to query something from a table, follow this SELECT syntax which you can find in the Books Online (BOL). An example:

SELECT Column1, Column2, Column3 FROM TableName WHERE Column1 = aValue

What are you trying to do with TRIM, RTRIM, STR, SUBSTRING, SPACE,STUFF, CHARINDEX?? These are functions you can use in your queries. For their usage, please look in the BOL.



Imar Spaanjaars
Everyone is unique, except for me.
Old June 23rd, 2003, 07:03 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts


You have posted a lot of messages asking questions that would be quickly answered by examining the avilable documentation. It would be better if you checked the documentation before resorting the list.

In this case the documentation SQL Books Online (free to download if you don't already have it). There are very good examples of SELECT and TRIM, RTRIM, STR, SUBSTRING, SPACE, STUFF, CHARINDEX there.

David Cameron
Old June 23rd, 2003, 07:31 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post

Just a small correction; SQL Server does not have a TRIM function. It does, however, have LTRIM and RTRIM, which respectively trim spaces from the left and right hand side of a character string. Nest these one inside the other to simulate the (VB) TRIM function.

Jeff Mason
Custom Apps, Inc.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sql Server Problem monika.vasvani SQL Server 2000 2 December 14th, 2006 03:09 PM
problem in with sql server Hussainrahmani ASP.NET 1.0 and 1.1 Basics 0 October 12th, 2005 06:04 PM
syntax problem with SQL nancy SQL Server 2000 4 May 6th, 2005 12:56 PM
syntax for storing chr(0) in sql server through vb neeraj.khattar Beginning VB 6 1 January 10th, 2005 02:20 PM
Problem with SQL Server ne0 All Other Wrox Books 1 August 6th, 2003 12:12 PM

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