![]() |
| Unusual DB column error |
|
byron
Forum Admin
|
I was doing a query against a MS SQL Server and in my cfquery I was accidentally pulling a column out of the database twice.
SELECT d.*, p.brand_id as plan_brand_id, m.mailserver_ip, m.mailserver_address, m.mailserver_ip FROM domain_info d LEFT OUTER JOIN plan_lookup p ON d.plan_id = p.plan_id LEFT OUTER JOIN mailserver m on m.mailserver_id = d.mailserver_id WHERE 1=1 and d.domain_id = 19479 I did a dump of the resulting query and some of the cols had the wrong data values. I only noticed the mailserver_ip cols and plan_brand_id col having wrong data. Many of the other columns seemed OK. I guess this is some kind of bug. |
||||||||||||
|
|
|||||||||||||
|
RconR
|
Your 2 line has the m.mailserver_ip column twice, look at the beginning and look at the end of that line you will see that you have it twice.
|
||||||||||||
|
|
|||||||||||||
|
byron
Forum Admin
|
Yes, I did notice this was the problem. It seems to be a CF or ODBC bug of some sort. Having the col twice in my select should not be shifting data in some of the columns. Doing a similar query in Query Analyzer will yield correct results.
Just wanted to post it as a FYI, |
||||||||||||
|
|
|||||||||||||
| Unusual DB column error |
|
||
|


