I am unable to load data using SQL Assistance

Tools
Enthusiast

I am unable to load data using SQL Assistance

Hi Friends

I am unable to load the data when inserting nulls or strings in the table using QUERY MAN.

insert into fact_current values(id, name, ,"expected",salary);

Wat is the problem?

Please tell me the solution.

KIRAN
kiran_teradata@ymail.com
6 REPLIES

Re: I am unable to load data using SQL Assistance

Dear Kiran.
If you want to express string in teradata sql, YOu need to use quotation mark '
not dobule quotation mark ".

Thank you.
Enthusiast

Re: I am unable to load data using SQL Assistance

Thanks for Your Help, I used only single quotes, not double qoutes, even the same problem

Re: I am unable to load data using SQL Assistance

Hi Kiran,

Please use 'NULL' keyword to insert a null value in a Nullable field using insert into statement.

Use single quote to inset strings.

Ex:

insert into table1 values (123,NULL,'Hello');

Thanks,

Sourav
Enthusiast

Re: I am unable to load data using SQL Assistance

insert into product (p_partkey, p_name, p_mfgr, p_brand,p_type,p_size, p_container, p_retailprice, p_comment) values
(?,?,?,NULL,?,?,?,?,?);

THEN THE O/P IS WRONG NO. OF DATA VALUES IS DISPLAYED

The no. of columns is same

instead of using null, if i am using any string constant the result is same i.e., WRONG NO. OF DATA VALUES IS DISPLAYED

I am usign V2R5 Please help me to solve the problem
Enthusiast

Re: I am unable to load data using SQL Assistance

insert into product (p_partkey, p_name, p_mfgr, p_type,p_size, p_container, p_retailprice, p_comment) values
(?,?,?,?,?,?,?,?);

Assuming there is no default on the p_brand. If the column is not mentioned,it puts null in it, like any SQL select.

When you are importing data, you cannot have a mix of values and constants (null or anything else). SQL Assistant cannot work out whether you are trying to skip a column from your input or not.

Enthusiast

Re: I am unable to load data using SQL Assistance

But c the Help in tool bar and c the api, it says it support