Viewing 15 posts - 121 through 135 (of 168 total)
Please look into this
create procedure proc_test as
begin
declare @name varchar(100)
set @name="Gopi"
select @name
end
If you execute this SQL Server 2000 through an error like this
Server: Msg 207, Level 16, State 3,...
August 30, 2006 at 6:50 pm
I can see the only problem is
set @teste_varchar2 = "valor_fact" use single quotes instead of double quotes
August 30, 2006 at 3:28 pm
replace your temporary tables with table data type, which is allowed in UDF's
August 30, 2006 at 2:38 pm
Use User Defined Functions instead of Stored Procedure
August 30, 2006 at 2:30 pm
try this
select
a.id,a.name,a.tracking_number,a.start_date,
August 30, 2006 at 2:08 pm
I am totally agree with you..
But with careful validation of User Input at Front End Side and in Stored Procedure we can eliminate this type of vulnerabilities
Basically I like dynamic...
August 30, 2006 at 12:03 pm
I appreciate the explanation..
I guess you are talking about cons of dynamic sql.. Any way our situation is not this.. we are selecting columns dynamically from a table
I agree that...
August 30, 2006 at 11:39 am
Thanks for your quick response..
what are the disadvantages of using dynamic sql in stored procedure over your specified approach ( I really didn't get it properly)
August 30, 2006 at 11:21 am
I really like to know the approaches..
which can be used in this situation .
I understand the situation as Creating the resultset based on user requested columns .
August 30, 2006 at 11:09 am
Use dynamic sql in procedure
August 30, 2006 at 10:54 am
Yes, Using Output paremeters it should work
August 30, 2006 at 10:38 am
try this
SELECT i.ItemNmbr, i.ListPrce,i1.ListPrce
FROM IV00105 AS i left join (SELECT ItemNmbr, ListPrce FROM IV00105 AS i1 WHERE i1.ItemNmbr like '%Core') AS i1
on i.ItemNmbr=left(i1.ItemNmbr,len(i1.ItemNmbr)-5)
WHERE i.ItemNmbr NOT LIKE '%Core'
August 29, 2006 at 4:14 pm
try this
SET @queryString = 'SELECT b.employee_no, a.Access_Seq FROM ' +
rtrim(convert(char,@dbName)) + '..employee a, ' + rtrim(convert(char,@dbName)) + '..userlog b WHERE a.employee_no = b.employee_no
AND b.uname = '''...
August 29, 2006 at 3:44 pm
Good Catch..
Yes, Case is a function in T-SQL
August 29, 2006 at 1:33 pm
TRY THIS
DECLARE
CUR CURSOR FOR SELECT FIELD FROM ACTIVE_FIELDS WHERE STATUS
August 28, 2006 at 4:58 pm
Viewing 15 posts - 121 through 135 (of 168 total)