LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sql query doute

hi,

        i am using data base sql server in labview.i want select all data from table except some.using the following query but not working.

 

SELECT *(EXCEPT Column2) FROM Tablename;

 

SELECT * [except Column2] FROM Tablename;

 

select * from Tablename except(Column2);

 

select * from Tablename EXEC(Column2);

 

select * from Tablenameexcept(Column2);

 

select * from TablenameEXEC(Column2);

 

select * FROM TablenameWHERE FIELD NOT IN ('Column2');

0 Kudos
Message 1 of 8
(3,551 Views)

Hi,

 

I use something like this

 

SELECT col1, col3, col4
  FROM Tablename;

 

 

UliB

0 Kudos
Message 2 of 8
(3,538 Views)
Unfortunately, you can't define your own syntax in SQL. If you want just certain columns from a table you have to list the ones you want. If creating this list is too onerous because the list is large, you have a more fundamental problem: a bad database design.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 8
(3,492 Views)

hi,

      i know this but my column is more than 100.so i form query this type too long that y i am try onther methode.

0 Kudos
Message 4 of 8
(3,474 Views)
What you need to be doing is fixing your database design. Having 100+ columns in a table is absurd! Other than you and your software, how many other users access this database?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 8
(3,459 Views)

Sometimes you inherit a non-normalized database and need to take baby-steps in the process of repairing it.  This'll build a query with all columns except one.

 

Example_VI_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 6 of 8
(3,440 Views)

hi,

       my field record is more than 1000.so i will use this methode take more time.that y i am asking any sql query.. 

0 Kudos
Message 7 of 8
(3,397 Views)
So instead of 100 columns like you originally said, you are now saying you have 1000+ columns?
0 Kudos
Message 8 of 8
(3,376 Views)