Afficher un message
Vieux 11/09/2007, 22h36   #2
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Query using SQL Server

amj1020 (angelicred19@hotmail.com) writes:
> Need 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/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
  Réponse avec citation
 
Page generated in 0,04400 seconds with 9 queries