Viewing 15 posts - 5,071 through 5,085 (of 6,036 total)
Jeff, you don't need any special function.
I'm sure you've got our favourite "split" function.
Concatenate as many values as you need (starting from no values) into delimited string and select MAX...
September 20, 2006 at 3:24 am
You always welcome, Jeff. ![]()
When I've been asked (or I am asking
) for something what is...
September 20, 2006 at 12:04 am
There is an inbuilt function for that.
It's "MAX". It's strange you did not know about that. ![]()
Actually TSQL is a language to deal...
September 19, 2006 at 10:50 pm
User "sa" does not exist is OS environment.
Check out which user starts SQL Server service on your machine. And make sure that user can access that folder.
September 19, 2006 at 7:40 pm
Mita,
Probably you don't need report from all 14 mil rows every day.
You must be interested in service records for some period of time.
If you have set up clustered index on...
September 19, 2006 at 6:46 pm
Simple solution is proper database design.
You suppose to have separate table with unique identfiers for your "QuestionTree"s.
Probably you have, if you reference QuestionTreeUID.
Then you select COUNT(*) from that table WHERE...
September 19, 2006 at 5:27 pm
Did you test it?
DECLARE @Value nvarchar(50)
DECLARE @Mask nvarchar(50)
SET @Value = '150000'
SET @Mask = '1##5##'
SELECT 'OOOOOPS!', 'Value "' + @Value + '" is consistant with mask "' + @Mask + '"',...
September 19, 2006 at 4:19 pm
select StaffDetails.[Employee],
ISNULL(SUM(InvoiceTotals.[Total Net]), 0) AS TotalNet,
ISNULL(SUM(InvoiceTotals.[Total CostBC]), 0) AS TotalCost
from StaffDetails
Left Join InvoiceTotals on InvoiceTotals.[Nominal Code] = StaffDetails.[Nominal Code] and (InvoiceTotals.[Invoice Date] between '15/09/2006' and '15/09/2006')
where StaffDetails.Active ='Y' and...
September 19, 2006 at 3:42 am
You do not need IN even for INNER JOIN query:
update T
set ColumnName = SUBSTRING(T.ColumnName , 5, (LEN(T.ColumnName)-4))
FROM Table T
INNER JOIN ....
where T.ColumnName like 'the %'
September 19, 2006 at 2:13 am
Do not overcomplicate your queries.
This will be fine:
update Table
set ColumnName = SUBSTRING(ColumnName , 5, (LEN(ColumnName)-4))
where ColumnName like 'the %'
September 18, 2006 at 6:59 pm
Happy for you, guys, but that solution is wrong.
Mask '1##5##' will match all these: '125235', '123451', '151111', '100005', etc.
Why not open BOL on topic "LIKE" and find this: