Viewing 15 posts - 76 through 90 (of 95 total)
You are checking for the existance of @tblnm..
and dropping something else. I'm not sure thats what you're trying to do but...
probably your error is here:
select @drop_oldtbl = stuff(@tblnm...
August 10, 2005 at 1:39 pm
I ran into this a while back..and could never find any info regarding this error. Just out of curiosity..whats the latest sp installed ?
Matt
August 10, 2005 at 1:27 pm
create table #foo
(
row_id int identity(1,1) primary key,
word varchar(30)
)
go
insert #foo(word)
select 'hello'
union all
select 'goodbye'
union all
select 'how'
union all
select 'are'
union all
select 'you'
go
SELECT top 2 word from (select TOP 2 * FROM #foo order...
August 9, 2005 at 8:45 pm
Not sure if this is the best way to do it..but this works..
select * into #store from {table}
truncate {table}
insert
August 9, 2005 at 7:45 am
Here's somthing I wrote that may help you...I mispoke above ..you don't need to have a linked server to open an excel file from t-sql if you use openrowset or...
August 8, 2005 at 9:54 pm
Just a side to what Phil said..you just need excel.dll registered..
Also you may want to check your permissions on the folder where the excel file resides..
HTH
August 8, 2005 at 6:07 pm
try something like this...
select * from
(
SELECT *, SQRT(POWER((38.492497-latitude),2)+POWER((-121.404807-Longitude),2)) AS distance FROM location
)q
where q.distance < .16
order by q.distance asc
HTH
August 8, 2005 at 6:03 pm
You can do this with open query as well, I believe. You will need your dbas to create linked servers to the excel files. Check the BOL on this.
HTH
August 8, 2005 at 11:16 am
delete parent
from parent p
join child c
on c.all_fields = p.all_fields
--tested below
create table parent
(
p_id int identity(1,1) primary key,
vala int,
valb int
)
go
create table child
(
p_id int identity(1,1) primary key,
vala int,
valb int
)
declare @int int
set @int = 0
while...
August 8, 2005 at 11:08 am
Not sure I understand...
Are you asking why you are receiving data in the main view even though category is NULL ?
OR are you saying that you are not getting all...
August 8, 2005 at 7:39 am
This is a trivial solution..but never hurts to check...
Is there a field that is being populated with user data ?
I had a similar result on a field that was being...
August 3, 2005 at 1:37 pm
Difficult but not impossile. I created a database that does some six sigma analysis of data.
It took about 4 months to get most of the kinks out..and you are right...
July 25, 2005 at 12:28 pm
id try something like this..
go
create table author_prec
(
author_prec_id int identity(1,1),
rank int not null,
contributor_id int not null,
constraint AK_author_pred_rank Unique(rank),
constraint FK_author_pred_cont_id foreign key(contributor_id)
references contributor(contributor_id)
)
go
--we rank authors so that the lowest rank will be...
July 25, 2005 at 8:23 am
You can use sp_settriggerorder to set the order in which a trigger is fired...
EXEC sp_settriggerorder <trigger name>, <order>, '<operation>'
-- M Kulangara
July 25, 2005 at 7:05 am
Viewing 15 posts - 76 through 90 (of 95 total)