insert Multiple rows into the table from that table data


Posted on 16th Feb 2014 07:03 pm by admin

Hi All,

I have a requirement like to insert mulitple rows into the table from that table data only(I need to replicate the data).
In this table primary key is composite primary key with all foreign keys.primary key also including the Date foreign key.I need to change that date at the of insertion.
Did you know?Explore Trending and Topic pages for more stories like this.
INSERT
INTO myschema.Fact_page_performance
(
time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available ,
date_sk
)
VALUES
(SELECT time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available
FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
WHERE date_sk=20090509,20090510
);

But it is giving the error like missing Expression.
Could anyone please help to me.

Thanks
No comments posted yet

Your Answer:

Login to answer
99 Like 13 Dislike
Previous forums Next forums
Other forums

Help? Need help on project with templates involving mysql and php.
I'm having a hard time explaining what I want but basically here is what I have in place:

-Da

help me fix these syntax errors...
I keep getting multiple syntax errors on this script like this one:

Parse error: syntax error

PHP Script runs on CLI but not through web browser
I am running into an issue that I just can't seem to find the answer to. I have a Windows Server 200

Auto install
Hi I have a directory lets say "apps" that I then have more folders ie "email",

SQL query not working well
Hi,
I made a small table with 5 rows and want to make them an sql consult using rownum

Select question
Hi,

First I would like to say that php is pretty new for me..
so please don't shoot me if

a dificult string search
Hi I don't know a way around this. I want the user to input a password, but to make it a bit complca

DYNPRO_FIELD_CONVERSION
Hi gurus,

I got a dump when I run one of my program. the dump is described below:

PDO returns erroneous columns from within pdt
Hi All,

This is a truly weird behavior:
When using a simple pdo fetch, erroneous columns a

problem with GROUP BY and ORDER BY
i usually use this query to display the last 10 entries from a sql table:

Code: $query = &quo

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash