 |
| 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
|
|
|
|

June 21st, 2003, 03:44 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
TRIM, RTRIM, STR, SUBSTRING, SPACE,STUFF, CHARINDEX, etc.
regards.
Mateen Martin
[email protected]
|
|

June 21st, 2003, 09:36 AM
|
 |
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.
Cheers,
Imar
----------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

June 23rd, 2003, 07:03 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Mateen,
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.
regards
David Cameron
|
|

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.
www.custom-apps.com
|
|
 |