Viewing 15 posts - 1,756 through 1,770 (of 8,731 total)
You've already got an example on how to parametrize your dynamic sql, but you kept using the string concatenation. That's a basic NONO in my ruleset.
Why do you want to...
December 12, 2016 at 5:54 am
Revenant (12/9/2016)
djj (12/9/2016)
crookj (12/9/2016)
Ed Wagner (12/9/2016)
Stuart Davies (12/9/2016)
Manic Star (12/8/2016)
Alan.B (12/8/2016)
GravitationalThreshold
Boundary
Border
Line
Vector
Algebra
Calculus
December 9, 2016 at 9:42 am
sgmunson (12/9/2016)
Luis Cazares (12/9/2016)
SELECT bk.CustomerNumber,
...
December 9, 2016 at 6:48 am
I'd suggest that you read Thom's comments. However, this is a shot in the dark to show what you might need.
SELECT bk.CustomerNumber,
cal.Day_Uid,
...
December 9, 2016 at 6:30 am
rgp151 (12/8/2016)
December 8, 2016 at 2:05 pm
Would a FULL OUTER JOIN help?
I changed your sample data to get some results.
-- sample data
DECLARE @table1 TABLE (id int identity, content int NOT NULL, primary key(id, content));
DECLARE @table2 TABLE...
December 8, 2016 at 1:33 pm
Thom A (12/8/2016)
Repeat of post http://www.sqlservercentral.com/Forums/Topic1841367-2799-1.aspx under different account?Try to keep one topic per questions 🙂 😎
You linked to this thread.
December 8, 2016 at 12:50 pm
I'm confused. Do you want to have a default or a computed column?
For a default, you might need a trigger to handle that option.
December 8, 2016 at 10:45 am
Alan.B (12/8/2016)
Jeff Moden (12/7/2016)
This Saturday, 12/10, marks the anniversary of a very unhappy event for me...Ditto.
I can't help feeling sad when I remember this. I never met him in...
December 8, 2016 at 10:24 am
The description doesn't begin to describe the real problem.
Without at least having the full query and actual execution plans, there's no real advice that can be given here. I agree...
December 8, 2016 at 10:05 am
Ed Wagner (12/8/2016)
Revenant (12/8/2016)
Kaye Cahs (12/8/2016)
Manic Star (12/8/2016)
crookj (12/8/2016)
Brandie Tarvin (12/8/2016)
Stuart Davies (12/8/2016)
Ray K (12/7/2016)
whereisSQL? (12/7/2016)
Manic Star (12/7/2016)
Ed Wagner (12/7/2016)
djj (12/7/2016)
Luis Cazares (12/7/2016)
Ed Wagner (12/7/2016)
DamianC (12/7/2016)
Revenant (12/7/2016)
Manic Star (12/7/2016)
LimboStick
Man
Machine
War
Materials
Labor
Delivery
Midwife
Midtown
Midriff
Bare
necessities
oxygen
Hydrogen
Bomb
Explosion
Implosion
December 8, 2016 at 9:12 am
What Thom said, just don't use varchar(MAX) to optimize the resources. 😉
Just keep the length of the longest type (in this case 1).
CREATE TABLE foo (
id INT IDENTITY(1,...
December 8, 2016 at 7:49 am
I don't find the confusing part. Or maybe I just noticed the 3 hints to the correct answer.
I need to ensure the databases are backed up while minimzing load on...
December 8, 2016 at 7:14 am
There's no direct code, but this should help.
DECLARE @Datetime datetime = GETDATE();
SELECT @Datetime, CONVERT(char(10), @Datetime,101) + STUFF( SUBSTRING( CONVERT(char(100), @Datetime,109), 12, 15), 10, 4, ' ');
December 7, 2016 at 2:08 pm
Here's an approach similar to Phil's, but both will fail if the value starts with '0'.
DECLARE @test1 VARCHAR(10) = '16-17';
DECLARE @test2 VARCHAR(10) = CAST( LEFT( @test1, 2) - 1 AS...
December 7, 2016 at 1:44 pm
Viewing 15 posts - 1,756 through 1,770 (of 8,731 total)