Viewing 15 posts - 9,811 through 9,825 (of 13,469 total)
since this is a one time update, i would not create the defaults inside a cursor;
i would just generate the sql, and run it once.
this gets similar results, but without...
March 24, 2010 at 3:28 pm
well mine calculates the max row size, but it would be misleading for for tables that have a varchar(max) columns, since their size is -1...when it is really what,a...
March 24, 2010 at 10:06 am
It sounds like you are thinking every table has an owner the way Oracle works; since SQL 2005, that's not true any more.
now everything is part of a schema, and...
March 24, 2010 at 9:51 am
it sounds like you want to know the last command a spid happened to issue...in your case you think it was a stored procedure:
SELECT SDEC.[most_recent_session_id],DEST.TEXT
FROM sys.[dm_exec_connections] SDEC
CROSS APPLY...
March 24, 2010 at 9:39 am
i have this saved in my snippets; it is slightly different from the formula you pointed to, but you could change it easily:
select object_name(object_id),sum(max_length) from sys.columns group by object_id
March 24, 2010 at 7:20 am
oh you can generate the CREATE TABLE script via TSQL; it's just like so many things in SQL Server, the answers are spread out everywhere, and you have to put...
March 24, 2010 at 6:22 am
i think the entire path+file must be in dbl quotes, not just the filename;
copy "c:\SQLOldFiles\TestRemainderFile.txt" c:\SQLNewFiles
March 23, 2010 at 10:05 pm
interesting David;so it would jsut be the html for <title></title>? and you want to make sure it doesn't have things like > instead of & g t ; in...
March 23, 2010 at 11:34 am
here's an example of how two seemingly different queries can be combined as a function without using dynamic sql;
the param being passed decides which results to return. this might give...
March 23, 2010 at 11:28 am
i'd want to see the proc, i's quite possible whatever you are doing does not have to be done with dynamic sql.
it's possible to create a view that has...
March 23, 2010 at 11:15 am
glad i could help!
March 23, 2010 at 10:28 am
yes you can; the correct syntax is below;
note i added a suggestion to make it cleaner and easier to read:
select
CASE
WHEN SCE_AYRC = '05/06' AND C.MAV_BEGW IN('36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52')
THEN '06/07'...
March 23, 2010 at 10:19 am
i think this will do what you are after; this leaves 0-9,A-Z,a-z and strips out everything else...commas,punctuation, hi ascii, etc.
select dbo.StripNonAlphaNumeric(address1) from #addr
--results
53240thaveneapt104
1000sectorwaystapt111ac
3333summerpointplace
pobox22000a330042
5566firststettnlot204aapt2c
select ascii('a'),ascii('z'),ascii('A'),ascii('Z')
GO
CREATE FUNCTION StripNonAlphaNumeric(@OriginalText VARCHAR(8000))
RETURNS VARCHAR(8000)
BEGIN...
March 23, 2010 at 10:03 am
this is a common security issue. The problem is that when you access any resource OUTSIDE of SQL server, like network shares, local hard drives,sp_OA type functions etc, it doesn't...
March 23, 2010 at 9:45 am
mikelordi2 (3/23/2010)
March 23, 2010 at 9:36 am
Viewing 15 posts - 9,811 through 9,825 (of 13,469 total)