06-22-2012 10:10 AM
Gotcha. Unfortunately the person who was responsible for the DB is no longer working with us, so it's all on me. Having not used SQL or LabVIEW before, it's going to be a long, rough road. I should be getting into the week long class in the next month or so for Course 1 and 2. I'm hoping that will benefit greatly.. Thanks for your help
06-22-2012 10:32 AM
One of the first things you should do is get the DB schema for the DB you will be working with. It will help you know what tables and what columns you will be working with.
06-25-2012 09:38 AM - edited 06-25-2012 09:39 AM
Mark,
I have the entire DB schema that I'm working with. Each table in the database contains the same column names: "ID" and "Value". I read a few tutorials about SQL as well as the SQL 101 link from a previous post. I'm still not quite sure how to join the submatches to query the database. The database tables are Cable_length, drawing, optional, output_type, pressure_range, pressure_type, series and termination. I've read and re-read your post that says:
SELECT * from T1 JOIN T2 WHERE T1.fi=<SN part from regex> AND T2.f1=<Another SN part>;
but I'm just not sure what to do.
Thanks again
06-25-2012 09:42 AM
@buickgn wrote:
Mark,
I have the entire DB schema that I'm working with. Each table in the database contains the same column names: "ID" and "Value". I read a few tutorials about SQL as well as the SQL 101 link from a previous post. I'm still not quite sure how to join the submatches to query the database. The database tables are Cable_length, drawing, optional, output_type, pressure_range, pressure_type, series and termination. I've read and re-read your post that says:
SELECT * from T1 JOIN T2 WHERE T1.fi=<SN part from regex> AND T2.f1=<Another SN part>;
but I'm just not sure what to do.
Thanks again
That particular SELECT statement is for retrieving data from a database by doing an inner join between two database tables.
If you don't understand how to write SQL statements after all your research, then perhaps you should tell you boss to find someone who does.
This is a LabVIEW forum, not a SQL forum. There are SQL forums elsewhere if you are so inclined.
06-25-2012 09:47 AM
Nice. I understand what the join/where is supposed to do, but I'm not creating a table from the VI, it's just breaking the part number down. I'm saying I don't know how to take the submatches and work them into the query because the submatches aren't parts of a table.
06-25-2012 09:49 AM
@buickgn wrote:
I'm saying I don't know how to take the submatches and work them into the query because the submatches aren't parts of a table.
That is because you don't understand SQL.
If you have the table names, then that is all the information that you would need to create the correct query.
At least that is all I would need.
Again, not a LabVIEW problem.
06-25-2012 09:56 AM
@nyc_(is_out_of_here) wrote:
@buickgn wrote:
I'm saying I don't know how to take the submatches and work them into the query because the submatches aren't parts of a table.
That is because you don't understand SQL.
If you have the table names, then that is all the information that you would need to create the correct query.
At least that is all I would need.
Again, not a LabVIEW problem.
If Mark decides to help since he has helped me thus far, that would be great. If not, it's fine. Which is the reason why I started off with his name in my first post today. I'm glad that is all you would need to create the correct query. I'm sorry that my question offended you.
06-25-2012 09:59 AM
I am not offended.
I just thought as an engineer you would want to increase your knowledge by learning on your own how to do a query such as this.
I guess I was wrong.
06-25-2012 10:02 AM
If I didn't want to increase my knowledge I wouldn't have spent the time reading different tutorials. The problem is they all discuss joins where there is already a table created. I'm not creating a table from the submatches.
06-25-2012 10:03 AM - edited 06-25-2012 10:04 AM
@buickgn wrote:
The problem is they all discuss joins where there is already a table created. I'm not creating a table from the submatches.
Huh?
Those two sentences don't make any sense.
I have a book called Visual Quickstart SQL. You might want to try that. Every possible SQL scenario.