LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BOOLEAN OPERATORS ON SQL STRING

I am using LV 8.2 with database toolkit. My application requires to get information from a table by evaluating columns on the table, The data on the colums is numeric and I need to write a MS SQL query capable to do boolean operations to compare them to numeric filters.

 

Any Advice?

0 Kudos
Message 1 of 6
(3,918 Views)

Well, this doesn't really sound like a LabVIEW question. Seems to be more of a T-SQL question. Smiley Wink

 

Basically, that's where the WHERE clause (pardon the bad repetition of terms) comes in.  Can you provide an example of what you're looking for? You may want to start here.

Message Edited by smercurio_fc on 09-15-2008 01:07 PM
Message 2 of 6
(3,904 Views)

thanks for replying , I already look into that link and did not find any boolean operators like AND, OR,  NAND for SQL .

 

I need a query to AND a column on a table and bring all rows to a second table if the AND on the column returns a number different than zero.

 

As I said this will be an AND operation on unsigned numeric values

 

0 Kudos
Message 3 of 6
(3,892 Views)

vochito wrote:

thanks for replying , I already look into that link and did not find any boolean operators like AND, OR,  NAND for SQL .


Trust me. AND and OR exist for T-SQL. Example: SELECT * FROM tblMyTable WHERE col = 5 AND col7 > 23.

 


I need a query to AND a column on a table and bring all rows to a second table if the AND on the column returns a number different than zero.

 

As I said this will be an AND operation on unsigned numeric values


This doesn't make much sense. You can't AND a single column. And what do you mean "bring all rows to a second table".

 

Message 4 of 6
(3,889 Views)

This is an example of a query I want to write  :

 

Select * from Table_1 into Table_2 where ((business AND 23) <> 0)

 

In other words I want to apply an AND filter to the business column and pick only the rows for which the evaluation returned a value different than zero.

 

THis is because Business column contains numeric values ranging from 0 to 255 they reperesent a binary array. the number at the right side of AND is also a number which represent another binary array.

0 Kudos
Message 5 of 6
(3,883 Views)
You are referring to bitwise AND. This is done using the "&" operator. You can see MSDN for more information.
Message 6 of 6
(3,862 Views)