Query...
From: jpatton (jppatton_at_vt.edu)
Date: 05/28/04
- Next message: Mohammad-Reza Taikandi: "Search more that one field!"
- Previous message: jpatton: "Re: Opening large query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 May 2004 08:33:17 -0400
This is fairly straightforward but it is just one of those things...
If I query a database like so (this was pulled from the code and modified a
little of course):
SELECT ITEM1, STRING(REPEAT(0, 20 - LENGTH(T1.ITEM2)), REPLACE(T1.ITEM2,
'-', '')),
FROM TABLE1 T1 JOIN TABLE2 T2 ON T1.BLAH = T2.BLAH
WHERE ITEM2 = (SELECT SOME VALUE)
What I am curious about is in my WHERE clause do I:
#1. Need to repeat the formatting (methods) around T1.ITEM2?
#2. Can I refer to it as I am, just ITEM2 or do I need to specify T1.ITEM2
or use an AS clause?
Thanks!
- Next message: Mohammad-Reza Taikandi: "Search more that one field!"
- Previous message: jpatton: "Re: Opening large query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|