Ask a Question related to Coldfusion Database Access, Design and Development.
-
Ruszaj #1
Subquery
I am trying to update a table with data in a "look up table." Specifically, I
have a table that contains zip codes but is missing both city & state fields.
The zip codes are 9 digits (5 digit zip code followed by 4 zeros) in one table
& 5 digits in another. I cannot seem to join the 2 tables because of the
discrepency in values. I've tried regexp with no luck.
Any suggestions would be greatly aprreciated.
Ruszaj Guest
-
Avoiding subquery
Hi, if anyone feels like a little quiz (but I don't know the answer), just for interest: Is it possible to rewrite this: SELECT... -
using list in subquery
I have a query that I would like to pass a list of values to use in the WHERE statement. How do I use a list in the WHERE statement? Example:... -
SQL subquery question
I have a query running inside of Coldfusion webpage. query blah cfoutput query blah { query another_blah { cfoutput another_blah -
Select From SubQuery
Yes you can create pseudo tables and reference them in the outer query as you have done. -- HTH, SriSamp Please reply to the whole group only! ... -
subquery with more than 1 fields
select * from ordermaster where (orderid,customerid) in select orderid,customerid from orderdetail the sql can't be run in ms sql and is there... -
Dan Bracuk #2
Re: Subquery
The syntax is database specific, but you want to do something like this:
update t1
set city = t2.city, state = t2.state
from t1 join t2 on zipcode = substr(t2.zipcode, 1, 5)
where city is null
Originally posted by: Ruszaj
I am trying to update a table with data in a "look up table." Specifically,
I have a table that contains zip codes but is missing both city & state fields.
The zip codes are 9 digits (5 digit zip code followed by 4 zeros) in one table
& 5 digits in another. I cannot seem to join the 2 tables because of the
discrepency in values. I've tried regexp with no luck.
Any suggestions would be greatly aprreciated.
Dan Bracuk Guest
-



Reply With Quote

