Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I am trying to union two tables by this command on import data
"SELECT 'XXXX' AS SiteName, * FROM XXXX.dbo.jurnaltrans
union
SELECT 'YYYY' AS SiteName, * FROM YYYY.dbo.jurnaltrans"
and get this ERROR
"DataSource.Error: Microsoft SQL: Error converting data type varchar to float.
Details:
DataSourceKind=SQL
DataSourcePath=XXXXXXXXXX
Message=Error converting data type varchar to float.
Number=8114
Class=16
PLEASE HELP
Solved! Go to Solution.
I'm not sure this is the correct place to ask a question like this, but oh well.
Have you ensured that both tables have the same number of columns, and both the order of the columns are the same and the data type.
Hi @sagidam ,
The UNION operator is used to combine the result-set of two or more SELECT statements.
You may list the corresponding columns like syntax codes below:
SELECT City, Country FROM Customers
WHERE Country='Germany'
UNION
SELECT City, Country FROM Suppliers
WHERE Country='Germany'
ORDER BY City;
You may also create a calculated table like DAX below to combine columns using DAX .
New table= UNION (SELECTCOLUMNS(Table1,"Account Name",Table1[A]),SELECTCOLUMNS(Table2,"Account Name",Table2[B]))
For more professional SQL help, you may post your issue in SQL Server Community.
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @sagidam ,
The UNION operator is used to combine the result-set of two or more SELECT statements.
You may list the corresponding columns like syntax codes below:
SELECT City, Country FROM Customers
WHERE Country='Germany'
UNION
SELECT City, Country FROM Suppliers
WHERE Country='Germany'
ORDER BY City;
You may also create a calculated table like DAX below to combine columns using DAX .
New table= UNION (SELECTCOLUMNS(Table1,"Account Name",Table1[A]),SELECTCOLUMNS(Table2,"Account Name",Table2[B]))
For more professional SQL help, you may post your issue in SQL Server Community.
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I'm not sure this is the correct place to ask a question like this, but oh well.
Have you ensured that both tables have the same number of columns, and both the order of the columns are the same and the data type.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 80 | |
| 40 | |
| 31 | |
| 27 | |
| 27 |