Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 infraction

Author  Topic 

Limuh
Yak Posting Veteran

94 Posts

Posted - 2008-03-07 : 01:07:51
have a column named AGING CATEGORY. under this colum there are values 30,60,90, and i want get only the values equals to 30? please help.

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-03-07 : 01:48:15
SELECT [AGING CATEGORY] FROM myTable WHERE [AGING CATEGORY] = 30

Is there only this column ?

I'm assuming the column is an INT data type.

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page

Limuh
Yak Posting Veteran

94 Posts

Posted - 2008-03-07 : 02:59:09
thanks. the column contains 120+ Day what data type i need to use?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-03-07 : 03:20:14
quote:
Originally posted by Limuh

thanks. the column contains 120+ Day what data type i need to use?


What is the current datatype?
Are you storing values in csv format?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Limuh
Yak Posting Veteran

94 Posts

Posted - 2008-03-07 : 05:13:25
the current data type was Char. and i change it to nvarchar am i correct? yes im transferring csv. Thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-03-07 : 05:21:48
Then you might have to use PATINDEX to fileter records containing 30

SELECT * FROM myTable WHERE [AGING CATEGORY] LIKE '30 +%'
Go to Top of Page
   

- Advertisement -