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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Field Question

Status
Not open for further replies.

Ammodog

Technical User
Dec 13, 2002
97
0
0
US
I have a Query that has a field for a file location that I use in an asp application. What I want to do is make another field in the same query that takes the last 4 digits from the file location field.
Example:( File Location Field: /home/file/test.doc )
What I want to bring over to the other field ( .doc)

I have a table set up that corrolates the .doc,.pdf.xls to the corrosponing picture so that on the web page it will bring up that picture. Any assistance will be greatly appreciated.

Christopher Abney
There is no limit to the good you can do if you dont care who gets the credit
 
SELECT ....., right([File Location Field], 4] FROM tableName ....

by adding the right() function to the field you should be able to just add the above expression to your exising SQL.

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top