LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Break down a string into individual parts to search a database

Solved!
Go to solution

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

0 Kudos
Message 21 of 38
(955 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 22 of 38
(948 Views)

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

0 Kudos
Message 23 of 38
(933 Views)

@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.

 

 

 

0 Kudos
Message 24 of 38
(929 Views)

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.

0 Kudos
Message 25 of 38
(924 Views)

@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.

0 Kudos
Message 26 of 38
(922 Views)

@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. Smiley Wink

0 Kudos
Message 27 of 38
(910 Views)

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.

 

 

 

 

 

 

0 Kudos
Message 28 of 38
(905 Views)

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.

0 Kudos
Message 29 of 38
(901 Views)

@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.

 

 

 

Message 30 of 38
(898 Views)