Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 problem with union query

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2004-08-09 : 04:38:57
I have a union query

select myindex,name from table one union all
select myindex,name from table two union all
select myindex,name from table three

Works okay but now I am having a strange problem -- myindex is an auto increment value. For some reason in the results of the above query if myindex is 127 or more it tell me myindex is 127. (Which is incorrect if I check just that table)

What could be causing this?
This is in mysql.

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-08-09 : 08:29:08
maybe your autonumber field is smallint and it ends on 127???

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2004-08-09 : 08:32:40
no it is fine in the actual table.
The problem is in the results of my union query.
Any ideas?
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-08-09 : 08:48:04
i have no idea how mysql handles this stuff... and why this happens

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page
   

- Advertisement -