Error when sqooping data to Vertica with column name as 'From','To' - sqoop

I am trying to sqoop data to Vertioca to a table which has Column named 'From','To', because of which I am getting erorr as VJDBC ERROR: Syntax error at or near "To" . Any alternative to this if we cannot change the column name in DB

As suggested by #marcothesane in the comment, Adding double quotes resolved my problem.

Related

Laravel Excel Error with SQ Server. Error converting data type nvarchar to bigint

I'm tryin to import and excel file to my SQL Server Database but when I try to create the form to upload the file I get this error:
Illuminate\Database\QueryException
SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Error converting data type nvarchar to bigint. (SQL: select top 1 * from [schedules] where [schedules].[id] = import)
Screenshoot of error
Even when I have the function in the controller it throws this error. Seems that is trying to get 1 record from database but cannot pass the nvarchar to match the ID column.
I have checked the documentation and nothing. Made it a few times, different methods with same error.
Seems that I figured it out. It was problem with the routing calling de show function
I had the same issue and trying to find the solution came upon this question. Thankfully I read the comments as Fernando's solution was also mine.
This was caused by a misordered Route in web.php
Route::Get('label/{label}' ...
...
Route::Get('label/create' ...
I swapped the order and all fixed
Route::Get('label/create' ...
...
Route::Get('label/{label}' ...

SQLSTATE HY104; INVALID PRECISION VALUE. ERROR IN PARAMETER

I am using SSIS for ETL. Source and destination databases are Oracle.
When I run job through SQL agent its prompts me with the following error:
This table contains 5 date columns which are creating this issue.
I have tried all possible solution but it didn't work. It does not seems data issue as I rerun job on those selective dates which worked perfectly. On full load it failed.
The bottom error message is:
Data Flow: Task:Error: SQLSTATE 22007, Message: [Microsoft][ODBC Oracle Wire Protocol driver]Invalid datetime format. Error in parameter 17.
You have an Invalid datetime format. You need to fix it by correcting either the data or the format model you are using but, since you haven't included any code, we can't help further.
I have a similar issue, the difference is my source is the SQL Server database and the destination is Oracle database.
I converted the source DateTime columns to type String first and then they were loaded to destination date columns successfully.

LINKED TABLE WITH QUERY INSIDE CONTAINS "/" IN COLUMN NAME

I'm trying to create an H2 link to an oracle database with this query :
CREATE LINKED TABLE MyLinekTable('oracle.jdbc.OracleDriver','jdbc:oracle:thin:#127.0.0.1:1521:orcl','login','password','(SELECT "/BIC/ZBSARK" as FLOW FROM MYTABLE)');
And i get this error :
Error: ORA-01424: missing or illegal character following the escape character
; SQL statement:
CREATE LINKED TABLE P710_ParamFRS2('oracle.jdbc.OracleDriver','jdbc:oracle:thin:#127.0.0.1:1521:orcl','login','password','(SELECT "/BIC/ZBSARK" as FLOW FROM ZPARAM_FRS)') [1424-197]
SQLState: 22025
ErrorCode: 1424
I tried to escape the "/" with "\" and [] and \Q..\E but no sucess !
My remote table (on oracle) contains 2 columns : /BIC/ZBSARK and PLANT
[create table MYTABLE(
"/BIC/ZBSARK" varchar(20),
PLANT varchar(20))]
When i try with the PLANT column instead of the "/BIC/ZBSARK" column, this work well :
CREATE LINKED TABLE MyLinekTable('oracle.jdbc.OracleDriver','jdbc:oracle:thin:#127.0.0.1:1521:orcl','login','password','(SELECT "PLAN as FLOW FROM MYTABLE)');
I tried to escape the "/" with "\" and [] and \Q..\E but no sucess !
Can some one help or has the same problem ?
Thanks a lot !
This is an H2 database bug. An issue was filled about it on GitHub:
https://github.com/h2database/h2database/issues/2073
The fix will be available on the standard version after h2-1.4.199.
If needs, you can build H2 from its current sources and use the generated jar.
Sources are here:
https://github.com/h2database/h2database
Building instructions are here:
https://h2database.com/html/build.html#building

ORA-00984: column not allowed here error while loading data

I am new to sql loader and trying to load data using sql loader. I am getting column not allowed here for following field
DR165_CREDIT_LIMIT_EXP_DT POSITION (14692:14699)
"CASE WHEN :DR165_CREDIT_LIMIT_EXP_DT = '00000000' THEN NULL
WHEN :DR165_CREDIT_LIMIT_EXP_DT = BLANKS THEN NULL else TO_DATE(TRIM(:DR165_CREDIT_LIMIT_EXP_DT), 'YYYYMMDD')END" ,
Could you please suggest what needs to be fixed? Thanks in advance for help
Possible duplicate of Oracle sqlldr: column not allowed here. BLANKS is a sqlldr keyword and may not be used in that manner. Try using '' instead.
Also, considering that BLANKS is a string it should be wrapped in quotes.

I am unable to create table in MySql (Error 1064)

While I am creating a table In MySql, I am getting an error. I don't know What the problem is, but it will be helpful if I understand the reason behinId it.
Query:
create table publish(
From varcahar(60),
To varchar(60)
);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'From varcahar(60),To varchar(60))' at line 1
Several errors:
1.- From and To are reserverd words you need to escape them
2.- varcahr -> varchar
Final code:
create table publish(
`From` varchar(60),
`To` varchar(60)
);
It says varcahr(60) not varchar(60)
Spelling problem
create table publish(From varchar(60),To varchar(60));
This is the right one. You misspelled varchar
And also From and To are reserved words. Check this Reserved Words In MySql

Resources