SQL Developer Data is not compatible with column definition - sql

I'm trying to insert data into my table but I am receiving this error:
"SQL Developer Data is not compatible with column definition or is not available for a nut nullable column"
The column that is getting this error has data of the form 7391DBDF-40D5-E523-80C2-3863BB43AC67.
I believe this is a uniqueidentifer but but I'm not sure how one would insert this datatype into SQL Developer.
nvm: got it. Use Varchar

Same error importing good data into a number column with SQLDeveloper, problem was not specifying precision and scale on the column.
Solved by setting size to 28,0.

Related

Error when trying to load data from an OData Source Editor to a SQL db table

Several Errors of the same type when trying to load a SQL db table from an OData SharePoint connection.
[GFXBankAccountProcessing - DB GFX Account List [2]] Error: An error occurred while setting up a binding for the "BLCompanyID" column. The binding status was "DT_NTEXT". The data flow column type is "DBBINDSTATUS_UNSUPPORTEDCONVERSION". The conversion from the OLE DB type of "DBTYPE_IUNKNOWN" to the destination column type of "DBTYPE_WVARCHAR" might not be supported by this provider.
It is expected to load the table and proceed to the next function within the process. I believe it has something to do with the data conversion but I am not sure what to convert the data to. I have looked to try to compare datatypes that the table in the DB is requiring. It is a NVARCHAR but I am not sure why it would fail. BLCompanyID is only one column, some of the other columsn are succedding while that one and a few others are failing.
The problem is that the data type you are trying to store into the destination table is not the correct format. For instance, if the destination table requires an nvarchar(255) and you're trying to insert a DT_NTEXT, it will fail. You will need to convert the column to DT_WSTR with a length of 255.
Here's a quick reference that I have bookmarked to help me:
http://wiki.melissadata.com/index.php?title=FAQ%3ASSIS%3AData_Type_Conversions

exporting the data gives error when the type is 'smalldatetime' and value is null

In SQL server, I have a table with 'smalldatetime' data type for one of the column. When I am trying to export the data using Microsoft SQL server import/export wizard, it is giving me conversion error because the field contains NULL value in Date field. Can you please help me in resolving this error.
What steps need to be followed in order to resolve the conversion error.
Are you trying to copy "table to table" or "query to table"?
Cause if your problem is only with null values you can write a query and use ISNULL() function.
Can you post the error here? I´m asking cause maybe your problem isn´t it. Maybe you´re trying to convert a type into another that is not compatible.

ASP.NET VB SqlBulkCopy String or binary data would be truncated

I'm trying to use SqlBulkCopy to upload a data table into SQL Server.
I'm getting this error:
String or binary data would be truncated.
I'm using
sqlBulkcopy.WriteToServer(dtCustom)
The SQL Server column is defined as nvarchar(50)
I changed the column to nvarchar(150) and same problem
This line is causing the problems with the import:
Enter the Location of Inspection
The line is 32 characters
If I remove "on" then it works and imports.
So what's the deal with a SQL Server table column defined as nvarchar(50) and 32 characters for data going into it?
Any ideas?
The columns have to be mapped. Even though the datatable has the same column names as the SQL table - in the asp.net vb coding you still have to do column mappings.

VS 2005 SSIS Error value origin

I have an ssis package created in vs 2005 that has started to give me the following error:
[Lawson Staging Table [4046]] Error: There was an error with input column "JOB_CODE" (4200) on input "OLE DB Destination Input" (4059). The column status returned was: "The value violated
the integrity constraints for the column.".
My first question is: what are the 4046, 4200 & 4059 values following my table, column and destination?
My second question is about the integrity constraint message. The destination table is a heap (no keys or indexes) with no constraints. The destination column is defined as a varchar(10). The input column is from oracle, is defined as char(9) and is called job_code. So - where is there an integrity constraint defined?
The final question is about the select statement; looks like the following:
Select ...
,lpad(trim(e.job_code),10,'0') as job_code ...
If I take the lpad and trim functions out, it works but I need these functions in place because my spec calls for a fixed length column padded with leading zeros. This column returns data as expected in TOAD but fails in the ssis package. Does anyone see an issue with how the functions are being used?
Since this package worked in the past but suddenly started to throw this error, I'm assuming that new invalid data has come into play. however, recently added rows don't seem to be any different then historical records.
Those numbers are more likely to be the ids assigned to the each task/table/column etc.
You could probably go to the advanced editor of the data flow task and look at the input and output properties. You can see that for each input or for each column there is an ID assigned.
Next: The error that you are getting occurs usually when "Allow Nulls" option is unchecked.
Try this:
Look at the name of the column for this error/warning.
Go to SSMS and find the table
Allow Nulls for that Column
Save the table
Rerun the SSIS

Lookup transformation between DB2 packed decimal and SQL Server DT_NUMERIC in SSIS

We use DB2 as our main production database, but we use SQL Server for many other things i.e. to do integration between other customers and vendors via EDI etc.
I have a table in SQL with SO numbers and I try to make a lookup in DB2 to get all the invoices for the SO's in my table, so here's what I did.
Created a connection to the DB2 using the Microsoft® OLEDB Provider for DB2
Created a data fllow with a source using a SQL Server connection.
Added a Data Conversion Transformation trying to convert the INT so value to a decimal with a precision of 12, but I couldn't change a precision in a DT_DECIMAL, so the only datatype that I have the option to change the precision is DT_NUMERIC.
Added a lookup transformation to lookup the data withing DB2.
Now when i try to create the join between the source table and DB2 I get an error Cannot map the input column, 'so', to the lookup column, 'orno', because the data types do not match.
According to Microsoft this is not a bug and they suggest to use the DT_NUMERIC where you can change the precision.
If I try to convert the SO to a DT_DECIMAL without changing the precision I'd get the same error mentioned above.
Is there any way to work around the limitations from SSIS and change the precision in a DT_DECIMAL conversion so I could do the match?
Or any other suggestions?
The simple answer is to change the connection property in the DB2 connection to treat DECIMAL as NUMERIC.
See bellow