Hi,
I am new to Vertica as well as SQL.
I have an requirement to create a table and populate with the data from different table. The user enter these details(new table name and the source table name) in the front end application.
Can you any one share me the sample query to capture the user inputs. or let me know, which document i can refer for this
Thanks,
Saveetha
Sample Vertica SQL with the inputs from an application
Moderator: NorbertKrupa
-
- GURU
- Posts: 527
- Joined: Tue Oct 22, 2013 9:36 pm
- Location: Chicago, IL
- Contact:
Re: Sample Vertica SQL with the inputs from an application
Code: Select all
INSERT INTO your.table (column1, column2) VALUES (value1, value2);
Checkout vertica.tips for more Vertica resources.
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Sample Vertica SQL with the inputs from an application
Maybe this is what you need?
Code: Select all
create table <<new_table_name>> like <<source_table_name>>;
insert into <<new_table_name>> select * from <<source_table_name>>;
commit;
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Re: Sample Vertica SQL with the inputs from an application
i have used a java query builder to construct the query based on the user input from the UI.