p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   SQL Server 2000 (http://p2p.wrox.com/forumdisplay.php?f=20)
-   -   sql server syntax problem (http://p2p.wrox.com/showthread.php?t=803)

mateenmohd June 21st, 2003 03:44 AM

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

Imar June 21st, 2003 09:36 AM

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.

David Cameron June 23rd, 2003 07:03 PM


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

Jeff Mason June 23rd, 2003 07:31 PM

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.

All times are GMT -4. The time now is 06:37 PM.

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