Viewing 15 posts - 541 through 555 (of 691 total)
To expand on Indu Jakhar's response, in order to eliminate non-numerics -
create table #t1 (a int)
create table #t2 (b varchar(2))
insert into #t2 select 1
insert into #t2 select 'a'
insert into #t2...
June 24, 2004 at 2:01 pm
Sure you can! Just set default values, and execute the procedure sending the parameters by name.
CREATE PROCEDURE Parm_Example
@Parm1 varchar(100) = NULL,
@Parm2 varchar(4000) = 'Parm2 value',
@Parm3 varchar(100)= 'Parm3 value',
@Parm4 varchar(100) =...
June 24, 2004 at 1:01 pm
If EXECUTE converts to unicode under the hood, it apparently doesn't have the maximum characters restriction that sp_executesql does. If it did, sqlSushi's query wouldn't have worked!
Steve
June 24, 2004 at 12:15 pm
To take what SQLBill said a step further, you can force the inactive portions to the end. I don't remember where I found this stored procedure. It may have been...
June 24, 2004 at 12:04 pm
I have a number of jobs which perform file operations via xp_cmdshell and have never experienced anything like this. I would suggest that you take a long, hard look at...
June 23, 2004 at 3:25 pm
You could use 'EXECUTE', which doesn't have to be nvarchar.
Steve
June 23, 2004 at 3:18 pm
dbcc showcontig will show you all the indexes, and even which ones should be rebuilt. Based on the results of showcontig, you can then use dbcc dbreindex or dbcc indexdefrag...
June 23, 2004 at 3:16 pm
create table #test (#char varchar(10), #date smalldatetime)
insert #test (#char)
values ('1/1/2000')
insert #test (#char)
values ('2/2/2000')
insert #test (#char)
values ('3/3/2000')
update #test
set #date = cast(#char as datetime)
select * from #test
drop table #test
Something else to consider...
June 23, 2004 at 3:13 pm
I'm not sure, but the import data wizard works quite well. Right click on the table, select all tasks, then import data.
Steve
June 23, 2004 at 3:04 pm
Like this???
Select SX.Status
From StatusXref SX
join ITRegInfo ITRI
on SX.StatusId = ITRI.Status
Steve
June 22, 2004 at 3:51 pm
Make sure the user isn't defined as an owner of any objects in the database. If so, execute sp_changeobjectowner 'object_name', 'new_owner' to change the owner to a valid database user,...
June 22, 2004 at 1:45 pm
Given your example,
declare @column varchar(20)
set @column = 'FOOD\r¦ BOX 2'
select ascii(substring(@column, 7, 1))
-- or --
select ascii(substring(column_name, 7, 1))
from my_table
where -- other record identifying stuff here
Good luck!
Steve
June 22, 2004 at 1:03 pm
A full database backup does not truncate the transaction log. Log truncates only occur when a transaction log backup is done. The alternative would be to set the recovery model...
June 22, 2004 at 11:14 am
I have a stored procedure which does exactly what you are looking for, plus reindexing based on scandensity, and a "factor" based on number of pages.
I can post it if...
June 17, 2004 at 12:44 pm
Viewing 15 posts - 541 through 555 (of 691 total)