Viewing 15 posts - 1,651 through 1,665 (of 1,957 total)
select DESCRIPTION from CIRC.TAG
Where Rownum <= 10
AND @ReportParameter1='apple'
UNION ALL
select DESCRIPTION from CIRC.TAG
WHERE @ReportParameter1='bat'
UNION ALL
SELECT NULL
WHERE @ReportParameter1 NOT IN ('bat'...
January 7, 2011 at 6:09 pm
SeanBarberPro (1/7/2011)
I have a question about Disconnected Recordsets that i havent been able to find much information on.
When the disconnected record set is created on a SQL server where...
January 7, 2011 at 5:48 pm
jabberpunch (1/7/2011)
emp_id display_name
1 ...
January 7, 2011 at 5:27 pm
create table #test(person varchar(50),dated smalldatetime);
insert #test
values('Mr. ADAMS ','2011-01-07 17:00:00')
,('Mr. BEACH ','2011-01-07 16:30:00')
,('Mr. BEACH ','2011-01-07 16:00:00')
,('Mr. SCHAL ','2011-01-07 15:30:00')
,('Mr. ADAMS ','2011-01-07 15:00:00')
,('Mr. SCHAL ','2011-01-07 14:30:00')
,('Mr. JONES ','2011-01-07 14:00:00')
,('Mr. BEACH ','2011-01-07 13:00:00')
select...
January 7, 2011 at 1:57 pm
Does the same thing happen if you use exactly the same date and time for both queries?
January 7, 2011 at 10:41 am
Rem70Rem (1/6/2011)
This seems to be a good approach, but some year have 52 weeks when some other have 53.
Yes, you would have to deal with that manually when populating the...
January 6, 2011 at 7:50 am
I don't have 2005 available right now, but this should work I think...
You create a credential first, then create an agent proxy that will use that credential.
Once these are...
January 5, 2011 at 5:31 pm
Add a new column to your table e.g. RollingWeek smallint
update yourTable set RollingWeek=FinWeek where FinYear=2010
update yourTable set RollingWeek=FinWeek + 52 where FinYear=2011
update yourTable set RollingWeek=FinWeek + 105 where FinYear=2012
etc etc...
January 5, 2011 at 5:13 pm
Does this help?
Basically, the idea is to have another column that counts the weeks between two dates.
--= test data
DECLARE @t table(theDate smalldatetime, FinYear smallint, FinPer tinyint, FinWeek tinyint) ;
set...
January 5, 2011 at 4:23 pm
select REVERSE(STUFF(REVERSE('1, 2, 3, 4'),CHARINDEX(',',REVERSE('1, 2, 3, 4')),1,'dna '))
is one way - not a great way - but it is one way....
January 5, 2011 at 12:02 pm
sc-w (1/5/2011)
That was just what i needed.Thanks for all the help, one more quick thing. Those big functions what senario would you use those in?
Thanks again
They are useful...
January 5, 2011 at 3:06 am
create procedure sproc_temp(@xml xml)
as
begin
create table #b (ID INT)
insert into #b(ID)
SELECT n.value('.[1]','int') as ID
from @xml.nodes('//@ID') as a(n)
select * from #b
end
January 4, 2011 at 7:12 pm
I don't know for sure but it seems like SQL server is trying to connect to the linked server before it runs the query.
IF you enclose the call to the...
January 4, 2011 at 6:23 pm
CELKO (1/4/2011)
It would also help if your data elements kept the same name from table to table and you followed ISO-11179 rules. For example, a table is a set so...
January 4, 2011 at 4:33 pm
Sort of pseudo code - with guessed table/column names...
;with grouped_addresses as
(
select name,address1,address2,address3,sum(1) over(partition by address1 [,address2] [,address3]) as dupe_count
from addresses
)
select name,address1,address2,address3
from grouped_addresses
where dupe_count>1
If you really only care about address1, just...
January 4, 2011 at 4:18 pm
Viewing 15 posts - 1,651 through 1,665 (of 1,957 total)