Viewing 5 posts - 1 through 5 (of 5 total)
Hey Pals,
Wondering if this would do...!!
Create procedure sp_GetColVal (@COLNAME AS varchar(100), @ID AS INT)
AS
DECLARE @SQLQuery
SET @SQLQuery = 'SELECT ' + @COLNAME + ' FROM Jobs WHERE ID = ' + @ID
EXEC (@SQLQUERY)
GO
Can...
October 22, 2005 at 6:08 am
#599348
HI David,
Thanks for the solution. It works gr8 for me.
Can you give me some light on why the "greaterthan and the value" worked and "less than and equal to" didn't.
ILANGO
June 24, 2005 at 7:21 am
#568258
Hi AJ,
The problem is like from a column of nvarchar datatype, I have to fetch the values as per the user inputted "From" and "To" values.
So the user may key in...
June 24, 2005 at 5:50 am
#568233
Anyways the query :
SELECT * FROM EMPLOYEE WHERE [NAME] >='B'
fetches me records that start from "B" and the rest.
shouldn't the "<=" too work similarly? like:
SELECT * FROM EMPLOYEE WHERE...
June 24, 2005 at 5:12 am
#568223
Hi Jonathan,
The datatype of the field "NAME" is nvarchar(250).
June 24, 2005 at 5:05 am
#568221