Comments (3)
I spent some time looking at this problem. When I used DacExplorer, I can see the column is defined as a ComputedColumn and type type references the origin table's column. My guess is the correct way to determine the view's column type is to look up the data type of the source table's column.
from sqlsharpener.
Not sure if we can loop through the source columns used in the expression, but if we can we might be able to derive a type that will work. For example, if all columns are int
then use int
, else if all are numeric, but at least one is decimal
or float
then use float
, else if any are a string then use string
.
I think a work-around might be to wrap your expression in the view with CAST
as in Cast((col1 + col2) as int) AS ColName
.
from sqlsharpener.
I received a similar error in any table script where a column is a calculated column. I ended up having to modify my T4 to simple ignore any table that had a calculated column, as I tried multiple solutions to try to get it to work with the calculated column but had no luck.
from sqlsharpener.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlsharpener.