RE: Need an urgent help in StoredProcedures

RE: Need an urgent help in StoredProcedures

 

  

is the comparison between two fields of the same row? or any field1 should not equal the field2 for ANY row?

If two fields of the SAME row:
select field1,field2 from table
where field1 < field2 or field1 > field2

If two fields of ANY row:
select field1,field2 from table
where field1 not in (select field2 from table)



-----Original Message-----
From: Vallipuram, Suganthan [mailto:[Email Address Removed] Thursday, April 29, 2004 2:42 AM
To: LazyDBA.com Discussion
Subject: Need an urgent help in StoredProcedures



> Dear Friends,
>
> In MSSQL server-7, I want to write a stored procedure in which I would
> like to search a field value which should not be in another field. For
> example
>
> Table1 and ite field are field1 and field 2 both are integer, but the
> field1 is unique (AutoNumber).
> I would like to get the values of field1, but these values should not be
> in the field2.
>
> Please help me as soon as possible
>
>
> Thanks in advanced
>
> With Best Regards,
> Suganthan,V
>
>

---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Get today's cartoon: http://www.LazyDBA.com
To unsubscribe, e-mail: mssqldba-[Email Address Removed] ,
then respond to the confirmation email you get
For additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page