Viewing 15 posts - 91 through 105 (of 141 total)
Correct me if I'm wrong, but I thing using Sergiy's solution of
SET ROWCOUNT @RowsToGet
SELECT Number
FROM Numbers
ORDER BY NEW_ID()
SET ROWCOUNT 0
would contradict the RANDOMability (if that's a word
December 11, 2006 at 4:26 pm
1900 is a leap year. All years divisible by 4 is a leap year. Right? Or did I miss something?
December 8, 2006 at 8:29 pm
Use your column 'Last Run Date' to determine the last job run. Its already a valid date.
select distinct j.Name collate Latin1_General_CI_AS as 'Job Name',
server as 'Server Name',
Max(CAST((
SUBSTRING((Convert(varchar(10),h.run_date) +...
December 8, 2006 at 8:07 pm
Using the same logic and how Sergiy puts it...
Create Function dbo.fn_NamePart(@FullName varchar(60), @NameType tinyint)
returns varchar(30)
as
begin
Declare @Return varchar(30)
Select @Return = case @NameType
when 1 then Ltrim(Rtrim(Left(right(@Fullname, charindex(',' ,@Fullname)), len(right(@Fullname, charindex(',' ,@Fullname)))...
December 8, 2006 at 7:12 pm
select cast(1 as char(6)) + '|' + 'Name...'
1 |Name...
December 8, 2006 at 6:32 pm
What is the logic you used in your table-valued function? Try to use that within the select statement and avoid the function totally. Something like this...
declare @FullName varchar(60)
Set @Fullname = 'Kennedy,...
December 8, 2006 at 6:22 pm
Lucky for you, Sergiy, you have less than 1GB of a problem in that situation. In my case, we have over 50 SQL Servers, with data spread in 10 dbases...
December 8, 2006 at 4:39 pm
I'm getting more confused, the farther I read thru the thread.
December 8, 2006 at 4:22 pm
CREATE TABLE [OrderComments] (
[OrderID] [nchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Comments] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
-- populate table
create function ronald.fn_ConCatComments(@Orderid char(5))
returns varchar(8000)
as
begin
declare @Comments varchar(8000)
set @Comments = ''
select @Comments...
December 8, 2006 at 4:18 pm
"@results=@results Output"
Ooops, didn't realize that.
December 7, 2006 at 8:23 pm
You still cannot output to a variable your results even when using sp_executesql.
December 7, 2006 at 7:09 pm
Select Max(LossDate) as LossDate
INTO #GE_Claim_LossDate
from GE_Claim
Group By PolicyNumber, TableCode, SeriesCode
GO
Update T
Set ClaimNumber = c.ClaimNumber,LastName = c.LastName,FirstName = c.FirstName,LossDate = c.LossDate,InClaimFile = 1
From #tmp T
Inner join GE_Claim c
On T.PolicyNumber =...
December 7, 2006 at 5:04 pm
There seems to be an interruption on your TCPIP connection. Are you using a wireless network?
December 7, 2006 at 4:51 pm
Viewing 15 posts - 91 through 105 (of 141 total)