Viewing 15 posts - 286 through 300 (of 476 total)
This recent thread may help
http://www.sqlservercentral.com/Forums/Topic1721408-392-1.aspx
September 22, 2015 at 12:40 pm
If (as I think you do?) you re-use column names in other tables then if you have CustomerID in your Customer Table, as the PKey or as a Unique constraint/index,...
September 22, 2015 at 12:22 pm
Not sure what you are needing to achieve, but did you perhaps need:
SUM(COALESCE(pd.premium_amount, 0))
in which case you won't need pd.premium_amount in the GROUP BY.
I imagine that you don't want the...
September 22, 2015 at 12:10 pm
Assuming you want to create the same Foreign Keys on the "new" table, and other Constraints similarly, there might be several that you need to rename in the event you...
September 21, 2015 at 4:53 pm
cthorn112 (9/21/2015)
--WHEN (pd.premium_amount) IS NULL THEN 0--ELSE (pd.premium_amount)
COALESCE(pd.premium_amount, 0)
or
ISNULL(pd.premium_amount, 0)
COALESCE allowed unlimited parameters and will change datatype to that of the highest precedence - so if you have INT and...
September 21, 2015 at 4:43 pm
autoexcrement (9/21/2015)
UPDATE TableAlias
SET ColVal = 1
FROM RealTable AS TableAlias
WHERE TableAlias.ColVal <> 1
This allows me to include joins and...
September 21, 2015 at 4:35 pm
WayneS (9/21/2015)
Just confirming what I'm reading here... Do you actually have a production application with dynamic table / column names in the SQL?
Only one I can think of (i.e. a...
September 21, 2015 at 10:57 am
I imagine SSIS has come on a lot over the years, we built "Tools" years ago that have served us well so I haven't had need to use it, as...
September 21, 2015 at 8:09 am
GilaMonster (9/21/2015)
That would be extremely inefficient, to update every nonclustered index N times where N = number of rows in the table, instead of just recreating the entire thing.
Never occurred...
September 21, 2015 at 6:05 am
GilaMonster (9/21/2015)
Rebuilding a heap will automatically rebuild all nonclustered indexes.
Wow, that's handy. Thanks for telling me because I would have assumed that was not the case and then done...
September 21, 2015 at 4:56 am
Could you cross apply [capd_moduleenrolment], instead of inner join (including the tables that then JOIN to it, AND there relevant Where clause bits and pieces)?
September 21, 2015 at 4:34 am
Ah .. .so ALTER TABLE ... REBUILD rather than ALTER INDEX ... REBUILD ?
I had a look at BoL and it appears that ALTER TABLE ... REBUILD will rebuild clustered...
September 21, 2015 at 4:20 am
Just a thought: perhaps the default in the popup formfield could be changed from # to "#000000"? as I probably had not been using enough digits either (although that was...
September 21, 2015 at 4:05 am
Thanks for that. I've tried to use COLOR and failed, I had never thought to use QUOTES before ...
This contains some RED text
This contains some [color="#ff0000"]RED[color] text 🙂
That said, HIGHLIGHT...
September 21, 2015 at 4:03 am
call.copse (9/21/2015)
for many applications it may well be perfectly acceptable.
I agree, except that whenever I see it used it is never used with the Full Recovery Model (equivalent) syntax, even...
September 21, 2015 at 3:48 am
Viewing 15 posts - 286 through 300 (of 476 total)