Setting the Value of an Integer

VB_Student

New member
Joined
Jun 28, 2004
Messages
4
Programming Experience
1-3
I'm currently working with a sql server DB and need to pull all the information with an id that is not equal to the integer 4. However, I pass the integer on the form level of my VB. Net form. How can I get the equivilant of:

ColumnName <> 4

In vb. net if I'm passing an integer value

Thanks for any help
 

Paszt

Staff member
Joined
Jun 3, 2004
Messages
1,500
Location
Raleigh, NC - USA
Programming Experience
Beginner
The SQL statement you would need to use would be simular to this:

SELECT * FROM myTable WHERE Not ColumnName=4
 

VB_Student

New member
Joined
Jun 28, 2004
Messages
4
Programming Experience
1-3
Paszt,

I've come to the realization that I must set up a dynamic SQL statement within the Stored Procedure of SQL Server, However, I'm a little fuzzy on how to use the 'IIF' in SQL Server. I've used in it other version of SQL but not SQL Server's. If you can help it would be appreciated.

Thanks for the quick responce
 
Top Bottom