Viewing 15 posts - 496 through 510 (of 3,543 total)
Phil Parkin (6/12/2015)
vipin_jha123 (6/12/2015)
What if out form both statement comes from 2 different table.Regards,
Vipin jha
JOIN the tables.
Don't need any JOIN 😛
DECLARE @Name varchar(255),@Surname varchar(255);
SELECT @Name = [Name] FROM [table1];
SELECT @Surname...
June 12, 2015 at 6:33 am
Bit late 😀
SELECT NewsId
FROM #NewsEntities
WHERE EntityId IN (1,2)
GROUP BY NewsId
HAVING SUM(EntityId) = 1
June 11, 2015 at 6:52 am
W4Designs (6/10/2015)
David, you jumped WAY over my head with that one!
Mine too LOL I just an idea that jumped into my head
I was thinking of adding a new derived...
June 10, 2015 at 10:31 am
Jeff Moden (6/10/2015)
David Burrows (6/10/2015)
Jeff Moden (6/9/2015)
Is the number of columns in the final output a given or do we have to have the code figure that out?
Shouldn't that be...
June 10, 2015 at 10:26 am
This might be possible using derived columns but would be a very complex expression or using several derived columns to pad the string into 50 column chunks and a final...
June 10, 2015 at 7:30 am
In that case a script task is probably the way to go but in your case change the code to
start at col 50 and work backwards to first non space...
June 10, 2015 at 7:27 am
Your welcome
For quick, excellent and efficient answers Jeff's articles should always be your starting point 😉
June 10, 2015 at 7:09 am
Jeff Moden (6/9/2015)
Is the number of columns in the final output a given or do we have to have the code figure that out?
Shouldn't that be max number of rows...
June 10, 2015 at 6:59 am
With derived column transformation set it to new column and use an expressions like
SUBSTRING([address ] +REPLICATE(" ",50),1,50)
SUBSTRING([address ] +REPLICATE(" ",100),51,50)
SUBSTRING([address ] +REPLICATE(" ",150),101,50)
*NOTE* Not tested
June 10, 2015 at 6:50 am
Jeff Moden (6/3/2015)
David Burrows (6/3/2015)
Jeff Moden (6/3/2015)
If the PeriodNo is ever increasing, then yeah, I agree.
Thanks Jeff
Yes PeriodNo will always be increasing
I will go with Tom's suggestion 🙂
Just one...
June 4, 2015 at 1:53 am
Jeff Moden (6/3/2015)
If the PeriodNo is ever increasing, then yeah, I agree.
Thanks Jeff
Yes PeriodNo will always be increasing
I will go with Tom's suggestion 🙂
June 3, 2015 at 10:38 am
Brandie Tarvin (6/3/2015)
June 3, 2015 at 10:14 am
Thanks for the feedback Tom
1) How frequent are deletes?
Unknown as the user can run a process any number of times or not at all
2) How frequent are updates? Or are...
June 3, 2015 at 9:11 am
You need to make a Cartesian of the 2 tables and then left join them, like this
WITH a AS (
SELECT DISTINCT allowance.empid,allowances.allid
FROM allowance
CROSS JOIN allowances
)
SELECT a.empid,a.allid,ISNULL(allowances.amount,0) AS [amount]
FROM a
LEFT...
June 3, 2015 at 6:43 am
Viewing 15 posts - 496 through 510 (of 3,543 total)