Viewing 15 posts - 31 through 45 (of 95 total)
If your @subject value is set via a process(ie from a table, view, function, or sp)..make sure the user has privs on this process.
HTH
February 14, 2006 at 10:23 am
Ray..gives you a good solution...
but you may want to call it...
Select distinct OrderID, dbo.fn_ConcatStrings (OrderID)
From Mytable
February 10, 2006 at 11:15 am
not tested but ...Something like this...
declare @results table
(
[Hour] int,
QTR_Hour datetime,
Shift char(1) default 'N',
TotalHoldSecs int default 0
)
--set a @start and @end time manually if you want
declare @start datetime,
@end datetime
set @start =...
February 10, 2006 at 9:32 am
create a temp table with databasenames, and log file locations..etc..
Use a cursor to use sp_attach_db to attach each on.
HTH
February 10, 2006 at 5:27 am
declare @table table
(
some_value varchar(50),
some_other_value varchar(50),
some_other_other_value varchar(50)
)
insert @table
select NULL,NULL,'easy'
union all
select NULL,'as','abc'
union all
select '123',NULL,'abc'
union all
select NULL,NULL,NULL
select coalesce(some_value,some_other_value,some_other_other_value,'Nothing there')
from @table
February 9, 2006 at 1:35 pm
print substring(convert(varchar(10),getdate(),2),4,2)+'/'+substring(convert(varchar(10),getdate(),2),7,2)+'/'+substring(convert(varchar(10),getdate(),2),1,2)
February 9, 2006 at 1:30 pm
declare @table table
(
some_value varchar(10)
)
insert @table
select '250'
union all
select '25001'
union all
select '7265'
union all
select 'V4521'
update @table
set some_value = x.some_value
from @table t
join
(
select some_value old_value,case when LEN(some_value) <= 3 then LEFT(LTRIM(some_value),3) +...
February 9, 2006 at 11:36 am
2 yrs for Mainstream support
5 yrs for Extended support.
February 7, 2006 at 10:04 am
This is known issue. If you format the columns in excel and have the data re-entered, it should fix your problem(apparently just changing the format for entered data doesnt work). ...
February 7, 2006 at 10:01 am
I've done some thing similar a while back. I will say it is inefficient ..the main problem I had was determining whether the thread had completed. Basically find the spid...
February 7, 2006 at 9:54 am
If you can use global temp tables...
IF EXISTS (SELECT 1 FROM TEMPDB..SYSOBJECTS WHERE NAME = '##xx' AND TYPE = 'U')
BEGIN
DROP TABLE ##xx
END
If you are using local temp tables, the...
February 7, 2006 at 9:05 am
Something like this..
if(SELECT count(*) FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'RESULTS'
AND COLUMN_NAME = 'TOTAL_VOTES') = 0
BEGIN
ALTER TABLE [dbo].[RESULTS] ADD [TOTAL_VOTES] as Option1 + Option2
END
HTH
February 7, 2006 at 8:54 am
I solve this as follows...
This approach would allow you get any rank
Select top 1 Salary
from
(
Select top 2 Salary
from Salary
order by Salary desc
)
order by salary asc
HTH
February 7, 2006 at 7:41 am
This is the standard boundary value problem in SQL Server. Make sure you understand what is meant by "open" and "closed' interval or you run the risk of dubling some...
February 7, 2006 at 7:36 am
Mathew..have you tried creating the table before your conditional statements.and inserting into the created table(instead of doing insert into) ?
February 6, 2006 at 2:07 pm
Viewing 15 posts - 31 through 45 (of 95 total)