Viewing 15 posts - 136 through 150 (of 215 total)
There are many situations when you can use built in functionality to determine the day of the week or the month of the year and so have no apparent need...
October 16, 2007 at 3:12 am
Thanks.
I hadn't realised that it was possible to create constraints (PK, unique) on table variables so that's something else I learnt today.
Jez
October 12, 2007 at 9:22 am
Andras,
Are you suggesting that #temp tables are preferable to table variables?
Jez
October 12, 2007 at 9:09 am
Yes you can have this as part of your query:
declare @owner varchar(5), @contract varchar(6)
set @owner = '2345'
set @contract = '123'
select right (replicate('0',20) + right (replicate('0',5) + @owner,5) + right (replicate('0',6)...
October 12, 2007 at 9:02 am
As an alternative to a NOT IN query, you could use a left outer join:
select t1.ident_type_id as Form1_IDs
from form_ident_types t1
left outer join form_ident_types t7
on t1.ident_Type_id = t7.ident_type_id
and t7.form_id = 7
where...
October 12, 2007 at 8:53 am
If you are concerned about whether #tables are unique (and I think that they are), then use table variables instead.
There are a few differences such as you have...
October 12, 2007 at 8:39 am
Which of the steps takes the longest time?
As an alternative, why not download the required data from the second Oracle db into SQL Server and do the merge processing in...
October 4, 2007 at 4:21 am
I echo what Scott said.
I don't believe the client tools for Teradata are as good as for SQL Server. The only real tool available is the equivalent of Query...
October 4, 2007 at 3:50 am
If you want a single result then something like this would do:
select sum (
case when is not null then 1 else 0 end
+ case...
October 2, 2007 at 4:52 am
There are a few options that I can think of.
1. Create a copy of the empty table, copy in the last 60 days data, rename the tables so that the...
August 30, 2007 at 7:41 am
Can you post details of the error?
I suspect that the problem is due to the scope of the temp table #t. Effectively, the sp_executesql is a nested stored procedure and...
August 23, 2007 at 3:20 am
Have you considered xp_sendmail? Have a look at Books On Line.
Jez
August 21, 2007 at 9:29 am
I was replying to the original post in that doesn't a min()/count(*) with a group by give the same results and would be faster than the original query.
Jez
August 21, 2007 at 8:37 am
If you want to continue with the original idea (I'd missed out some end of brackets):
set @col004 = substring(@col004, charindex(dbo.gettoken(@col004,',',2), len(dbo.gettoken(@col004,',',2) + 2)), len(@col004))
The other solution would almost certainly...
August 21, 2007 at 7:32 am
I've probably missed the point entirely but does this do it:
select
distinct 'CONV 1' as Conveyour,
info as error,
min (substring(timecreated, 0, 7)) as date,
count(*) from 'Times Occured'
from log
where loggroup = 'CSCNV'...
August 21, 2007 at 6:13 am
Viewing 15 posts - 136 through 150 (of 215 total)