Viewing 15 posts - 14,956 through 14,970 (of 15,381 total)
Gus, that may have just revolutionized how I handle those types of situations from this point on. I took your example and put together a quick proof of concept aspx...
March 4, 2011 at 12:44 pm
To be more precise and maybe add a little clarity to what i was trying to convey...
select 'Update ' + so.name + ' set trm_cde = ''S'' where trm_cde in...
March 4, 2011 at 10:05 am
You could change the from in my previous post to
from sysobjects so
join syscolumns sc on so.id = sc.id
where sc.name = 'trm_cde'
and so.xtype = 'U'
That would get you a list...
March 4, 2011 at 10:03 am
You could create your stored procedure to do the insert for only 1 row and then call it however many times you need to.
March 4, 2011 at 9:51 am
Given that you have a table that lists all the tables that have this column (assuming the column trm_cde is identically named in all of them). A slight modification to...
March 4, 2011 at 9:46 am
You got it. Of course if this list expands you may end up kicking yourself as this list gets longer and longer. This approach is the simplest but it is...
March 4, 2011 at 9:21 am
Pink123 (3/4/2011)
So the description parameters will depend on...
March 4, 2011 at 9:17 am
This is very common scenario. You have a couple choices. You can either run dynamic sql or parse the values. Given the pretty common appearance of your string you might...
March 4, 2011 at 9:05 am
You can alternately use the IDENT_CURRENT('your table name here')
March 4, 2011 at 8:49 am
Is there a max of 13 descriptions or is the number of descriptions dynamic?
March 4, 2011 at 8:36 am
Sharon Kumar (3/3/2011)
Investigation_IdCase_IdInvestigation_NoteDateTimeTeam_IdStatus_Id
31101050282Testing Testing Testing 2011-01-26 11:45:00.000 2 1
51101050282sample 2011-01-26 00:00:00.000...
March 3, 2011 at 12:13 pm
Sharon Kumar (3/3/2011)
I had a table columns with
sno Name Case Datetime ...
March 3, 2011 at 8:22 am
Depends on what you need. Is this code you are trying to reuse? I have no idea what the business rules are or what the data looks like. Maybe TemplateGroup?...
March 2, 2011 at 3:35 pm
Or you could do an "update from" too. Not really sure what you are trying to do but there are lots of ways to do this.
March 2, 2011 at 3:30 pm
njdevils39 (3/2/2011)
I could, but I prefer a stored procedure for it if there is one just to pass through the parameters.
Not sure exactly what you mean but you can do...
March 2, 2011 at 3:28 pm
Viewing 15 posts - 14,956 through 14,970 (of 15,381 total)