Viewing 5 posts - 1 through 6 (of 6 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
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
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
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
Hi Jonathan,
The datatype of the field "NAME" is nvarchar(250).
ILANGO
June 24, 2005 at 5:05 am
Viewing 5 posts - 1 through 6 (of 6 total)