Viewing 15 posts - 256 through 270 (of 327 total)
As Noel implied, to ensure the value selected does not change between the time it is read and the time it is acted on, you would need to be within...
April 12, 2005 at 1:25 pm
Yes, seems to work fine for searching udf's!
April 11, 2005 at 9:54 am
Declare @first_part varchar(20),
@len_first_part int
Set @len_first_part = Len(@first_part)
Select max(seq_num)
From (Select seq_num = Right(your_col, Len(your_col - @len_first_part)
From Your_Table
Where Left(your_col, @len_first_part) = @first_part
And Isnumeric(Right(your_col, Len(your_col - @len_first_part)) =...
April 9, 2005 at 10:58 am
You might want to take a look at this thread. http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=169&messageid=170943
April 8, 2005 at 3:05 pm
declare @var varchar(20)
set @var = '1,234,567.00'
select Left(@var,len(@var) -3)
-------------------
1,234,567
April 8, 2005 at 2:46 pm
You might try breaking the job into smaller batches to see what happens.
Also, I don't see any kind of error checking so you have no way of knowing if any...
April 8, 2005 at 2:32 pm
The default return from a stored procedure is 0. So I have all my stored procedures explicitly return 1 to indicate success. Anything else I consider to be an error...
April 8, 2005 at 12:50 pm
The statement worked. There were no rows that matched the conditions of the WHERE clause.
Can you SELECT a row with the same WHERE clause?
April 6, 2005 at 11:54 am
Use the function descibed here http://www.sqlservercentral.com/scripts/contributions/157.asp
to convert your comma separated string into a table.
Example:
Select * from table_a where id IN (Select * from fn_split(@list) )
Or search this site...
April 5, 2005 at 11:13 am
Frank,
Very informative article.
Thanks,
Ron
April 5, 2005 at 9:16 am
Remi,
The ink wasn't even dry on that post!
Thanks,
ron
April 5, 2005 at 8:51 am
What are the advantages of using NOT EXISTS over NOT IN?
-thanks, ron
April 5, 2005 at 8:44 am
Rick,
Yes, a little caution is advised. In you first example
select convert(varchar(10), '2005-04-04 23:59:59.999', 20)
you are converting a string value to varchar(10).
In the second example
select...
April 4, 2005 at 7:59 am
KC,
Where (myDate BETWEEN '4/1/2005 00:00:00' AND '4/1/2005 23:59:59')
Your method will miss dates with times between 23:59:59.003 and 23:59:59.997.
You can try using the convert function (see BOL). Ex:
Convert(varchar(10), mydate, 101) to compare...
April 3, 2005 at 3:06 pm
From BOL:
Date and time data types for representing date and time of day.
April 3, 2005 at 2:26 pm
Viewing 15 posts - 256 through 270 (of 327 total)