Avatar of tenriquez199
tenriquez199

asked on 

Make an SQL query for the termination of a field??

Hi,

I have a date in a just one field like this 11/May/2011

but i need make a query that get all of 2011

something like this

..... where date = '...../2011'
Microsoft SQL Server 2005SQL

Avatar of undefined
Last Comment
tenriquez199
ASKER CERTIFIED SOLUTION
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

If it is a date field (instead of varchar as you have shown) then

where date >= '20110101' and date < '20120101'
Avatar of tenriquez199
tenriquez199

ASKER

Thanks
Microsoft SQL Server 2005
Microsoft SQL Server 2005

Microsoft SQL Server 2005 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. It includes support for managing XML data and allows a database server to be exposed over web services using Tabular Data Stream (TDS) packets encapsulated within SOAP (protocol) requests.

72K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo