cancel
Showing results for 
Search instead for 
Did you mean: 

reading data from table and print the value based condition

Former Member
0 Kudos

hi

my table like this

slno | value1 | value2 |

-


1 0 5

2 5 10

3 10 15

assume n= 8 ( where n is user define)

i want output like

number 8 between value 5 and 10

plz help

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try:

Select 'Number '+ U_Value3 + ' Between '+ U_Value1'and 'U_Value2

From [dbo\].[@UDT T0\]

Where T0.U_Value3=[%0\] and T0.U_Value3 BETWEEN U_Value1 AND U_Value2

Thanks,

Gordon

Former Member
0 Kudos

thanks to all

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Haresh,

It is so simple.

You use query for it .

Like between udf value 1 , value 2

Leena

Edited by: leenatrivedi on Jul 23, 2011 9:14 AM

Former Member
0 Kudos

thank u,

but i dont know the values of value 1 and value2

there just i gave the example

Former Member
0 Kudos

not need to values of value 1 and value 2

you use query

select you field from your table where u_filed between value1,value 2

Former Member
0 Kudos

Hi Harish....

You can try...

Select * From @TableName Where @Table.U_Field in (U_Value1, U_Value2)

Regards,

Rahul