"save query" in BigQuery overwrite my old saved query without previous notification - google-bigquery

I am using Google cloud BigQuery.
I just realized that when I save my query and then I edit / create new query... and then I click save query ... it overwrite my old saved query without any question before.
I hope will be good to popup some message about > ...if I want overwrite my old query.

Related

Creating Table in dataset in BigQuery

I want to create a Table for my dataset in BigQuery. I want to upload CSV file. When I upload it and clicked on "create table" it is saying:
unexpected error. Tracking number c986854671035387
What is this error and How can I solve this? (I also upgraded my BigQuery to 90 days free trial).
You need to check the data inside CSV. If it has column names and no faulty records.
you can download any sample CSV file from here and try
http://www.mytrapture.com/sampledata/

Cannot scheduling script in Big query without having to define destination table [duplicate]

This question already has an answer here:
Bigquery - schedule stored procedure not working anymore
(1 answer)
Closed 2 years ago.
I wrote the script in standard SQL that included declaring several variables and using loop to replace data in multiple tables and set it to be scheduled query in Big query. Before google updated the UI, I wasn't required to specify destination table so it worked just fine but after google changed its UI, It's required to define destination for query results or else the scheduled query cannot be created.
I tried creating scheduled query with destination table then It has this error message
'configuration.query.destinationTable cannot be set for scripts'
I read this document https://cloud.google.com/bigquery/docs/scheduling-queries
and it states that scripting query wasn't supposed to have destination table but it seems like google has changed it and now there's no option to not define destination dataset.
Is there anybody currently facing the same problem or have any solution to this problem?
Thanks!
I've had the same problem. When I rolled back the last UI update the problem was fixed. You can go back to the old version by clicking the "Hide Preview Features" button in the bar at the top of the screen.

How do I transfer a schema and all of its tables to a new database?

I have database a with schema foo which contains 20 tables. I want to move all of the contents of schema foo into database b without overriding the current content in database b.
Is there also a way to do it in pgadmin?
I found this link and perhaps it will be quite similar. But this particular link is for transferring a table.
Copy a table from one database to another in Postgres
You can script the first database with all its data once scripted you can run the th script within the other database it should work as long as you dont have tables in the second database with the same name
so in pg admin follow these steps to script the
-Right click on the database and click Backup.
-Selece a filepath and filename on where you want to save your script
-Select Plain as the format in the format dropdown.
-Go to Options and check "schema and data" in tab # 1.
-Then click on Backup.
-Then click Done.
-Then right click on your 2nd database and create a new query.
-Find where you saved the script and copy the script to the query
-run the query and should be all good
if you are unsure about this just create 2 practice databases and practice on those before you do it on the main one

How do I open an existing query in SQL Server 2012 Management Studio?

I'm a beginner and in class we're learning how to make tables, insert records, make foreign keys all through query.
I've made a 3 tables through query but now I have to edit a previous table through it's own query but I closed it already. How do I open it again so I can add something to the table? All I see is the "New Query" button.
The tables are all in one file, under one database.To be more specific, I want to open query window that shows up when you click "New Query" but I want to see the codes I wrote to make the table because I need to edit something there.
You won't be able to re-open closed table script if it has not been saved in a .sql file. Check Kyle's comment above for single table. Re-generate the script.
For more than one table, right click on Database name, Select Tasks->Generate Scripts-->Click Next --> Select all tables you want. Save script on clipboard. Paste in New Query. Save that file as SQL.
You can use advanced options also to generate the same script.
If you have saved your query earlier then open the folder which contains the sql code. Double click on that file, it will automatically open in SQL Server Management Studio.

phpMyAdmin CSV Upload Replace Data Not Working

I have created a database and table in phpMyAdmin.
I am importing the data from a csv file.
This works fine and adds the data correctly.
However each time I upload I want to replace the existing data.
I have ticked the box "Replace table data with file", it uploads fine but doesn't replace the existing rows it simply adds the new data as new rows below the old data.
Any ideas why this is happening?
This appears to be misleading text; it adds the "ON DUPLICATE KEY UPDATE" directive rather than truncating the table prior to insert, see the bug report at: https://sourceforge.net/p/phpmyadmin/bugs/4891/