Viewing 15 posts - 12,166 through 12,180 (of 13,461 total)
there is a function called Propercase in the script contributions section.
with that function installed, you could then simply do an update:
UPDATE SomeTable
SET NameColumn = dbo.Propercase(NameColumn)
Proper Case A String Or...
January 16, 2008 at 8:34 am
we had to maintain level 80 compatibility for a while;
tracing the application, we found that some sql statements which you could get away with in 80 fail in 90;
specifically it...
January 15, 2008 at 9:49 pm
a function is a special, more limited type of stored procedure. it is specialized, so it has more limitations.
here's some high points, but there's a lot of infor to google...
January 11, 2008 at 8:11 am
select * from sysindexes where name like '_Wa_Sys%' in sql 2000 or 2005.
SQL server collects statistics on every query you run....those statistics can be used to determine whether a...
January 11, 2008 at 7:47 am
I'm properly chastized for talking without testing...
my answer is appropraite for WHERE statements, but not a replace...
LIKE '%%%%' would be where a percent sign exists in the data, for example.
January 10, 2008 at 3:51 pm
two of the same character in a row is the escape for any special character in sql:brackets, percents, single quotes, etc.
replace(somecolumn,'%%','') to get rid of a percent sign, if it...
January 10, 2008 at 3:45 pm
maybe i read your attachment too quickly, but i didn't see a worksheet with the data, only the sheet with the column definitions.
if there was a worksheet with just data...
January 10, 2008 at 1:39 pm
ok, The command line you pasted does make it a little clearer...and I'm going to guess that the issue is still permissions;
hrggrouper.exe
-i D:\PCT_Warehouse\LoadFiles\GrouperFiles\AEGrouperTemp.csv <--input file i...
January 9, 2008 at 10:39 am
you could also do the same thing with a calculated column in Excel:
=IF(E3="N",B3 & " DECIMAL("&F3&","&G3&"),",B3 & " VARCHAR("&D3&"),")
that would return this for the fiurst column:
YPNO DECIMAL(8,0),
January 9, 2008 at 8:11 am
i just took what i thought were the relevant columns, pasted them in editPlus, and then ran some find and replace macros agaisnt it...I assumed AlphaNumeric columns were varchars,...
January 9, 2008 at 8:06 am
there's a similar thread where someone needed to generate the same kind of random sample...read matt Millers example here: http://www.sqlservercentral.com/Forums/Topic427826-338-2.aspx you'd change just the portion that did TOP 1000000...
January 9, 2008 at 7:29 am
looks like we'll need more info...can you post the actual contents of the bat file?
I've used xp_commandshell lots of times, and usually, if it doesn't come back it's due to...
January 9, 2008 at 7:20 am
glad you got it working Leonard; this is one of those things that adds to the toolbox, but you don't use too often.
I made this function to try and...
January 9, 2008 at 7:14 am
I tested this just now with the same example I had posted, but with 2005; I had to enable OLE witht he surface area tool first, of course.
It works on...
January 8, 2008 at 3:51 am
similarly, there is a SET command which rollsback automatically if an error occurs, so there's no need to explicitly check for @@errors:
create proc name
as
begin
SET XACT_ABORT ON
begin tran
update .....
update......
update......
update......
commit tran
end
January 4, 2008 at 11:31 am
Viewing 15 posts - 12,166 through 12,180 (of 13,461 total)