ack!
I usually access the data through Sybase, but I'm not really sure what type of SQL it is. I'm pretty sure its not MySQL. Micros is a POS system for the restaurant chain I work at, 'Micros Database' would be the correct term for it then
Let's see if I can give a better example though:
Line 1 - (database name).(table)
Line 2 - Column Names
Line 3+ - Data
Code:
micros.dev_def
obj_num lan_node_seq
1 3
2 4
3 5
4 6
6 9
100 ?
Code:
micros.lan_node_def
lan_node_seq ip_addr
2 192.168.100.100
3 192.168.100.101
4 192.168.100.102
5 192.168.100.103
6 192.168.100.104
9 192.168.100.106
So the idea is that I want the lan_node_seq in the micros.dev_def table to have its lan_node_seq to be equal to whatever the lan_node_seq is that has the ip_addr equal to 192.168.100.100
In the above example (in terms of logic, not a sql statement):
Where obj_num in micros.def_dev is equal to 100, then set lan_node_seq to the lan_node_seq in micros.lan_node_def where the ip_addr is equal to 192.168.100.100
result - set obj_num equal to 2
Now, I could set this up by hand, but there is a pile of stores this is going to be going into, and I just don't have the time to do it. I just want the update script to look it up.
Example:
In a different store, they have:
Code:
micros.lan_node_def
lan_node_seq ip_addr
6 192.168.100.100
So at that store, the script would look up that table and say, "Oh, where the ip_addr is equal to 192.168.100.100, the lan_node_seq is equal to 6. I will use this information now to fill in the lan_node_seq to be equal to 6 in the micros.dev_def table now"
Thanks for the help!