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

select error; data-conversion resulting in overflow - SQL Server????

Status
Not open for further replies.

kaul125

Programmer
Jan 29, 2002
87
US
I'm using 'union' as part of some of my querys for my datawindows and I'm getting the following error when I run the datawindow?

datawindow error: select error; data-conversion resulting in overflow

My database is MS SQL Server 7 and I'm using PB 6.5. It seems to me that when the first query in the datawindow returns 0 rows, then this error occurs. Otherwise, when the first query in the datawindow returns 1 or more rows I do not get this error even when the subsequent selects in the datawindow return 0 rows. I know that all the fields are large enough to receive the data.

My query looks like:

Select....
from...
where...

UNION

Select....
from.....
where..

What else could be causing this problem and how do I fix it?

thanks,

Keith
 
Hi,

The columns selected in statement 1 and statement 2 must be same type in a same order.

eg:
select name, age, telno
from table_1
where xxxxxxxxxx

union

select name, age, telno
from table_2
where xxxxxxxxxx

the only different could be is the table and where clause.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top