Viewing 15 posts - 46 through 60 (of 64 total)
Got it, this works:
declare @i char(1) declare @sql nvarchar(4000) set @i='a' SET @sql = 'select *,''''+@i+'''' from some_tbl' exec sp_executesql @sql
@i is a value fetched from a different table by cursor
thnx anyway
January 9, 2006 at 2:50 pm
I know, but that's not it, it's complaining about the value of
the variable as an unknown column.
It needs quotes or smthng.
Invalid column name 'a'.
January 9, 2006 at 2:40 pm
I know, but something's still not right with the regex, it drops some records, which are clearly rtf text
December 21, 2005 at 9:12 am
hey,
thanx, but your regex is dropping all spaces in the text
December 21, 2005 at 8:21 am
I wrote a small dll, which takes a string runs it through the clipboard and spits it out. Then I created a extended proc tied to the dll and now...
December 20, 2005 at 2:42 pm
Thank you, well, 'do it in SQL Server' meant a call from a stored proc.
I'm using this:
function dbo.st_RTF2TXT(@in varchar(8000)) RETURNS varchar(8000) AS
BEGIN
DECLARE @object int
DECLARE @hr int
DECLARE @out varchar(8000)
EXEC @hr...
December 20, 2005 at 11:47 am
ok steve, we know...great info...;-)
December 13, 2005 at 9:35 am
actually everywhere, tons of oracle, banks mostly
December 13, 2005 at 9:15 am
yeah, left join the tables, and handle the nulls, ok, I see...well, everyone obviously sees...
December 13, 2005 at 9:11 am
hey, are you in tokyo ? lived there for awhile.
December 13, 2005 at 8:38 am
this should print the tree path :
create procedure ref_id (@id int)
as
begin
declare @ref_id int,
select @ref_id = parent_id
from _table_
where child_id = @id
while @ref_id in (select child_id from _table_)
begin
set @id = @ref_id
select @ref_id = parent_id...
November 11, 2005 at 12:02 pm
I'm using your kind of example daily. I'm talking about code modifications.
November 3, 2005 at 12:19 pm
You can try something like:
declare @queryString varchar(1000),
@result int
set @queryString='create table r (result int) insert into r SELECT MAX(PERIOD) FROM dbo.Table1'
exec (@queryString)
select @result = result from r
drop table r
select @result
peter
November 3, 2005 at 9:42 am
Sounds interesting, remote short term is fine.
I think I can help you there.
deepforest3345*at*hotmail.com
November 3, 2005 at 9:23 am
Viewing 15 posts - 46 through 60 (of 64 total)