Viewing 15 posts - 346 through 360 (of 429 total)
Hi Sean,
I'd be happy to. Send it along.
Thanks
July 9, 2013 at 3:50 pm
I got it to work by doing this:
declare @sql nvarchar (max)
declare @server varchar(64)
declare @db varchar(64)
declare @table varchar(64)
select @server = quotename(parsename('[server].j3688802s.dbo.sample_web', 4))
select @db = parsename('[server].j3688802s.dbo.sample_web', 3)
select @table...
July 9, 2013 at 9:16 am
I just used this yesterday, if you're ever in the market for a quick select:
sp_MSForEachDB @command1='USE ?;
SELECT
Table_Catalog
,Table_Schema
,Table_Name
...
July 9, 2013 at 8:18 am
jimbobmcgee (7/8/2013)
DECLARE @liststr NVARCHAR(MAX) =...
July 8, 2013 at 8:34 am
Steven Willis (7/7/2013)
erikd (7/7/2013)
When I run:
select @liststr = coalesce(@liststr+',' ,'') + quotename(column_name)
from [server].j3688802s.information_schema.columns where table_name = 'sample'
print (@liststr)
I get a list of column...
July 8, 2013 at 8:27 am
sharath.chalamgari (7/7/2013)
are you looking for something like this
exec ('select @liststr = coalesce(@liststr+'+''''+','+''''+' ,'+''''+''''+') + quotename(column_name)
from '+ @server + '.'+ @db+ '.information_schema.columns where table_name = '+ ''''+ @table+'''')
Almost:
declare...
July 8, 2013 at 8:21 am
dwain.c (7/2/2013)
July 2, 2013 at 9:40 pm
dwain.c (7/2/2013)
The test harness in the article...
July 2, 2013 at 8:41 pm
dwain.c (7/2/2013)
erikd (7/2/2013)
I work with a lot of tables, but none of them are very large.
Please don't get me wrong when I say this. That is today. ...
July 2, 2013 at 7:48 pm
dwain.c (7/2/2013)
erikd (7/2/2013)
July 2, 2013 at 6:51 pm
I was looking at this script a month or so ago. Maybe you can make it work for your purposes? It sounds pretty close already.
July 2, 2013 at 11:37 am
I use the following SVF to extract integers only from phone number columns. So, you would run the following and it would return only the numbers from your patid column....
July 2, 2013 at 9:22 am
HanShi (7/1/2013)
erikd (6/26/2013)
, but I wanted to try it without a cursor to build the column list.
The code you posted in the first post does NOT contain a cursor. It...
July 1, 2013 at 8:52 am
The reason that doesn't work in my case is that the staging tables have certain columns (like statusflag) that are used to determine good vs. bad data, and then only...
June 29, 2013 at 8:05 am
Totally fine with me. Link is sent.
Thanks
June 27, 2013 at 7:30 am
Viewing 15 posts - 346 through 360 (of 429 total)