Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Format Text to Number 1

Status
Not open for further replies.

GIJoeFigure

Technical User
Jun 16, 2004
27
0
0
US
Hello all, I was wondering if I was to make a query def with this SQL statement, how would I do it correctly?
Code:
SELECT * FROM sampletable WHERE (SELECT FORMAT([Rows],0000) FROM sampletable) < 800

I would like to format the 'rows' column as all numbers but it is currently a text column and too hard to set as number format. I read a posting of a similar problem but I'm sure I'm missing something since I keep getting error messages saying this query's function will retrieve one response. Can the format SQL function change each field entry to number format? Please help!

 
Try the Val function. Select Val ([Rows])

ChaZ

"When religion and politics ride in the same cart...the whirlwind follows."
Frank Herbert
 
That worked like a charm Chaz! Thank you so much, what a difference one word makes in SQL!

 
Glad to help.

ChaZ

"When religion and politics ride in the same cart...the whirlwind follows."
Frank Herbert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top