Viewing 7 posts - 31 through 37 (of 37 total)
Sergiy (10/17/2007)
Max Yasnytskyy (10/17/2007)
Fair enough.How would you use LIKE [0-9] without making the query too complicated?
In your script:
IF @TmpString NOT LIKE [0-9]
Not too complicated?
:hehe:
Can i have a working example please
When...
October 17, 2007 at 9:01 pm
Sergiy (10/17/2007)
Max Yasnytskyy (10/17/2007)
October 17, 2007 at 8:47 pm
I have found an interesintg function in msdb, seems like it is working much better
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[udfTRANSELATE] (@mixedString AS varchar(max))
RETURNS varchar(max)
as
BEGIN
DECLARE @resultString varchar(max), @tmpString...
October 17, 2007 at 8:26 pm
Sergiy, if you were reading my post a bit more carefully you would have noticed that it is only integer, floating point number, money or decimal types are returning 1....
October 17, 2007 at 8:15 pm
Well spotted
But because i take a single character at a time '3e5' will never be validated as a whole...
October 17, 2007 at 7:25 pm
perhaps function like this may help you.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[udfTRANSELATE] (@mixedString AS varchar(max))
RETURNS varchar(max)
as
BEGIN
DECLARE @resultString varchar(max), @tmpString char(1), @i int, @strLen int
SELECT @resultString='', @i=0, @strLen=len(@mixedString)
WHILE...
October 17, 2007 at 7:08 pm
i would do it like this
DECLARE @tableName AS varchar (50), @sqlCmd varchar(max)
SELECT @tableName=nameOfTable
FROM
WHERE tabledisc = 1
SELECT @sqlCmd='SELECT * FROM '+@tableName
EXEC sp_executesql @sqlCmd
dynamic SQL...
October 17, 2007 at 5:34 pm
Viewing 7 posts - 31 through 37 (of 37 total)