Viewing 15 posts - 151 through 165 (of 663 total)
Any NULLs in your data
Declare @chrontel_part Varchar(100)
-- NULL
Set @chrontel_part=NULL
Select patindex('%-tr%', @chrontel_part)
Select left(@chrontel_part, patindex('%-tr%', @chrontel_part) -1)
Select Left(@chrontel_part,NULL)
BOL 2000:
If either pattern or expression is...
September 13, 2003 at 3:15 am
BOL 2000:
1) If there are multiple files in a filegroup, they do not autogrow until all the files are full. Growth then occurs using a round-robin algorithm.
2) DBCC DEFRAGINDEX: If...
September 13, 2003 at 2:34 am
Can you post the structured code
Tried, but loose the plot a bit with the brackets.
FROM entity e
LEFT JOIN TelephoneNumber t...
September 11, 2003 at 11:58 pm
Dead code!
((@trueRowCount <= 200)
OR (@trueRowCount > 200 AND 1 = 0))
Assumes any combination(s) can be selected
Think the ORs maybe a bit...
September 11, 2003 at 9:32 pm
First your check, check if the string contains '-tr' but for LEFT part the string must end with '-tr', thus patindex returns a 0 from which 1 is decducted and...
September 11, 2003 at 6:02 pm
What I was trying to get at was to materialize the view in the end.
mccork got their first.
Second thought, maybe one should look at the whole...
September 11, 2003 at 4:44 pm
Also used scptxfr.exe and script to yyyymmdd_hhmm file for historical purposes with a small team. With a bigger team used VB/SQLDMO which updated SourceSafe a file. Handy to compare, between...
September 11, 2003 at 4:14 pm
SELECT theEmp.fname+' '+theEmp.lname as fullName, tblEmployeeType.Type,
tblEmployAccident.TrackingNumber, theEmp.Email,tblEmployAccident.Completed,
tblAccidentInfo.staffMem,TimeOfAccident,DateOfAccident,
Case When DateDiff(hh,DateOfAccident,GetDate()) Between 0 and 24 Then 'Employee' Else ''...
September 11, 2003 at 3:59 pm
Same old problems all over the world. Powerplay, echo trips, etc.
September 11, 2003 at 4:09 am
Have a look at the CASE statement and maybe move it to the where clause.
SELECT theEmp.fname+' '+theEmp.lname as fullName, tblEmployeeType.Type,
tblEmployAccident.TrackingNumber, theEmp.Email,tblEmployAccident.Completed,
tblAccidentInfo.staffMem,TimeOfAccident,DateOfAccident,
...
September 10, 2003 at 11:52 pm
There was a previous discussion on the dba / developer and it got a bit heated.
In principal I'll go with Andy Warren answer except for the test database part. For...
September 10, 2003 at 6:46 pm
Declare @r Varchar(100)
Set @r=' a b c d e '
While CharIndex(' ',@r)>0
Set @r=Replace(@r,' ',' ')
Select...
September 10, 2003 at 6:22 pm
Does not answer the question.
SET ANSI_WARNINGS OFF
go
DECLARE @test varchar(3)
SET @test='More than 3'
PRINT @test
Go
Create table Test(t varchar(3))
Go
Insert Test values('12345')
Go
Drop table test
Go
SET ANSI_WARNINGS ON
go
DECLARE @test...
September 10, 2003 at 5:39 pm
Viewing 15 posts - 151 through 165 (of 663 total)