Viewing 15 posts - 3,661 through 3,675 (of 13,462 total)
love to figure this one out!
nice!
i split the data with DelimitedSply8K, then grouped it, and then used FORXML to reassemble a new string:
/*
AcctNumFuelTypes
0000000500444Biodiesel,Gas
00000026104Diesel,Gas,Other - Non Fuel
*/
With MyGroupedData
AS
(
--split it up and...
April 12, 2013 at 1:51 pm
yeah, but there's another version that supports varchar(max), which is the datatype for sys.sql_modules.definition;
it's effectively the exact same code but varchar(max) instead of varchar(8000)
good for massive strings you need to...
April 12, 2013 at 1:38 pm
check the same database in SSMS: is it set as offline? a lot of processes don't see offline databases, i know i've tripped over that a few times.
April 12, 2013 at 1:35 pm
another way is to use dbo.Delimitedsplit on sys.sql_modules.defintion, so every word in the code is separate, then simply join it to the name in sys.procedures.
April 12, 2013 at 1:22 pm
Sean Lange (4/12/2013)
April 12, 2013 at 12:33 pm
your issue is this part:
SELECT @CAPTUREDSTRING = [DeletedItems]
FROM (
SELECT TOP 1 GETDATE()As TheDate,stuff(( SELECT ',' + Name
FROM INSERTED s2
--WHERE s2.WHATEVERID= s1.WHATEVERID --- must match GROUP BY below
WHERE 1 = 1
ORDER...
April 12, 2013 at 12:28 pm
monilps (4/12/2013)
Sorry, I was not clear enough. I need to update table name.From TableA, TableB to aaa_TableA, aaa_TableB.
Thanks.
well you alreayd got the advice that this is a bad idea, but...
April 12, 2013 at 7:36 am
i installed both tools mentioned in this post the http://poorsql.com and http://www.dpriver.com, and between them both probably use them two dozen times a day.
there are subtle style differences...
April 12, 2013 at 6:26 am
gurjer48 (4/12/2013)
i have 2 questions??1.can we use insert,delete inside user defined function(i tried myself it showing error 'side-effecting operator 'DELETE' within a function.')?
if not why?
No you can't with the...
April 12, 2013 at 6:17 am
now that i had a sip of coffee, it's even easier:
create the new table on the fly:
--script out the constraints and indexes from the original table
--create the new table instantly...
April 12, 2013 at 6:09 am
50 millions rows of data is not really that much data. it sounds like you are being blocked. exclusive schema locks, data , etc.
this is my suggestion what you should...
April 12, 2013 at 6:04 am
i'l repeat what has already been said: it's a badk idea to expose your SQL se3rver directly to the internet.
that said, un doubtedly, you'll need to modify the router between...
April 12, 2013 at 5:47 am
you can do what some people call an exotic join...joins that are not T1.field = T2.field
but things like :
ON UserName = REPLACE(Userlogin,'\Domain','')
or on char index/patindex
ON (CHARINDEX(UserName , Userlogin)...
April 11, 2013 at 2:42 pm
fantastic job providing the DDL and sample data!
i think you can use row_number() to get what you are after:
SELECT * FROM (
SELECT
ROW_NUMBER() OVER(PARTITION BY symbol ORDER BY quote_date DESC)...
April 11, 2013 at 2:18 pm
datareaders gives them access to data, i think they just want to see the schema(table NAMEs and column NAMEs)
that permission would be VIEW DEFINITION (in a single database)
or VIEW ANY...
April 11, 2013 at 1:28 pm
Viewing 15 posts - 3,661 through 3,675 (of 13,462 total)