Viewing 15 posts - 391 through 405 (of 627 total)
For film buffs out there I highly recommend 'Ex Machina'. Recently watched it on Netflix and it blew me away. I'm so rarely impressed by movies anymore...maybe I'm...
February 22, 2016 at 7:54 am
Just a couple things to consider. Make sure you validate your data to make sure it's actually a number. i.e. (ISNUMERIC). Secondly, try to avoid using CONVERT in...
February 11, 2016 at 1:55 pm
Please include any DDL statements for test data next time. People will be much more willing to help.
I think this will do...cheers.
DECLARE @test-2 TABLE (contractno INT, Address1...
February 11, 2016 at 11:24 am
Luis Cazares (1/29/2016)
yb751 (1/29/2016)
J Livingston SQL (1/29/2016)
nice....but when there is an unknown number of values, how does the dynamic sql work?
LOL...yeah now that you mention it, that would be a...
January 29, 2016 at 2:06 pm
J Livingston SQL (1/29/2016)
nice....but when there is an unknown number of values, how does the dynamic sql work?
Here is a stab at it...but I'm not saying it's pretty. 😉
CREATE TABLE...
January 29, 2016 at 1:51 pm
J Livingston SQL (1/29/2016)
nice....but when there is an unknown number of values, how does the dynamic sql work?
LOL...yeah now that you mention it, that would be a complete pain if...
January 29, 2016 at 1:25 pm
This is an example on how you can do it using a crosstab.
DECLARE @myTable TABLE (ID INT, Name VARCHAR(10), Value VARCHAR(20))
INSERT INTO @myTable
VALUES
(1, 'user', 'MYS12345'),
(2, 'user', 'MYS12346'),
(3, 'user', 'MYS123435'),
(4, 'user1',...
January 29, 2016 at 1:12 pm
Hugo Kornelis (1/22/2016)
SQL Server will always first compile an entire batch, then execute it. During compilation, various things are checked against the schema. But modifications made...
January 22, 2016 at 12:23 pm
Sorry if I misunderstand but there is a problem with doing this?
CREATE TABLE test1 (col1 INT NULL)
GO
ALTER TABLE test1 ALTER COLUMN col1 INT NOT NULL
GO
ALTER TABLE test1 ADD CONSTRAINT PK_test1...
January 22, 2016 at 12:07 pm
Providing sample data would have gone a long way for your cause. That being said I threw this together but since you have so little information I'm not sure...
January 22, 2016 at 7:27 am
ssc_san (1/21/2016)
Thank you yb751!The real data has dates, but I wanted to simplify it.
Thank you!
At least you provided the sample data which is more than some. 😉
Good to know the...
January 21, 2016 at 8:59 am
J Livingston SQL (1/21/2016)
EDIT....moving on with a possible...
January 21, 2016 at 8:33 am
Hugo Kornelis (1/14/2016)
One thing that is missing is the explanation of WHY in this specific case enforcing the order impacts...
January 18, 2016 at 7:24 am
I have to admit that I was awe struck when I first saw the Saturn Rocket up close during my tour some years back. You don't realize how massive...
January 8, 2016 at 9:36 am
This is my stab at it but it's not quite right. The problem is making sure the set's are ordered correctly when they are together.
i.e. Making sure you don't...
December 22, 2015 at 1:32 pm
Viewing 15 posts - 391 through 405 (of 627 total)