![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've got a project of batch uploading some data into an ingres database. I'm not familiar with a UNIX environment in general, as well as ingres specifically... I've been emailed some basic instructions on how to make this work, but I would like to understand what I'm doing rather than simply "black-boxing" it. I've tried to find some basic documentation on ingres but have been unable to locate any. |
|
It looks like we're running Version II 2.6/0305 if this is any help... At this point I would like to know of some quick and dirty way of viewing data in a table. We're using an xterm window as an interface to the UNIX system from our windows desktops... |
#3
| |||
| |||
|
|
... At this point I would like to know of some quick and dirty way of viewing data in a table. We're using an xterm window as an interface to the UNIX system from our windows desktops... |
#4
| |||
| |||
|
|
Personally I like the bare-bones Ingres sql command, run from a PC client in a DOS window with scrollbars. me too... except that i run it in an emacs window... nothing like |

#5
| |||
| |||
|
|
"Roy Hann" <specially (AT) processed (DOT) almost.meat> writes: Personally I like the bare-bones Ingres sql command, run from a PC client in a DOS window with scrollbars. me too... except that i run it in an emacs window... nothing like being able to have good scroll back, ability to cut/edit/macro process the data, etc. Emacs, it's not just a tool, it's a way of life. |
#6
| |||
| |||
|
|
"Philip Lewis" <flip+spiced_ham (AT) andrew (DOT) cmu.edu> wrote in message Emacs, it's not just a tool, it's a way of life. I think we've had this conversation before! :-) well... no doubt i've had the conversation before, as with all good |
#7
| |||
| |||
|
#8
| ||||||||
| ||||||||
|
|
First and foremost, thanks to Roy and all the others that have posted responses to this request... |
|
SQL [database] CREATE TABLE new_table (fields and their attributes);commit;\p\g COPY new_table (field list) FROM [.csv file];commit;\p\g perform some validation, then... INSERT INTO [real_table] (target field list) SELECT (source field list) FROM code_table a, new_table b WHERE a.cd1=b.cd1 and a.cd2=b.cd2;commit;\p\g again validate, then... DROP TABLE new_table;commit;\p\g \q I've made the above as generic as possible while trying to keep it complete enough to allow everyone to evaluate the steps. So as of now I've got a few questions: 1) how do I set up a path designation so that the .csv file can be found? |
|
2) why is there a "commit" clause following every command? |
|
3) how can I "view" the data in new_table generically? |
|
ps. there's another part of my old gray cells that recalls something about commit control and rollback. I'm guessing that this is what the "commit" clause is referring to, but if that's the case then what's the value of putting it in the script after the CREATE command? So I'm wondering if there's more to this then I'm recalling... |
|
I'm also guessing that the WHERE clause is doing some sort of "join" function, |
|
and that the FROM clause is not only defining source tables for the INSERT but also providing a sort of table identification shorthand because the fields in the SELECT clause are all prefaced by the single letters associated with the respective tables in the FROM clause ("a" and "b" in my example). |
|
Again, if there's more to this than meets my eye please let me know. Although this is a "quick and dirty" task, we think it may be something that we'll use more than once, and so therefore want to know something about what we're doing. (!) |
![]() |
| Thread Tools | |
| Display Modes | |
| |