You are here: Re: Query Help using SQL Server « MsSQL Server « IT news, forums, messages
Re: Query Help using SQL Server

Posted by Erland Sommarskog on 09/11/07 21:36

amj1020 (angelicred19@hotmail.com) writes:
> Need help with a query.
> I need to get a date from table1 where the symbol is equal to OQY7 but
> the symbol in table table2 is OQY07.
> How do I get it to look for the first three characters plus the fifth
> character by skipping the fourth character?

Use the substring() function. Or left() and right(). All of them are
described in Books Online. I recommend you to look at all string functions,
because you don't know which one you may need next.



--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация