Viewing 15 posts - 6,421 through 6,435 (of 8,731 total)
MMartin1 (5/23/2014)
I would take a cursor over a triangular join if I was reporting on a running total in a columns. That's once instance.
That's ok if you can't (or don't...
May 23, 2014 at 12:44 pm
Another option:
SELECT ItemCode, SUM([Total Sales]) as 'Total Sales'
FROM(
SELECT T0.ItemCode, SUM(T0.LineTotal) as 'Total Sales'
FROM INV1 T0
WHERE...
May 23, 2014 at 10:38 am
As Sean said, datetime data types don't have format. If you define your column type in your flat file connection, and insert the value in a datetime column, you won't...
May 23, 2014 at 10:34 am
Nice Nevyn 😉
To be honest, I'd prefer your option over mine, but I wanted to avoid dependance on the schema in case that someone can't create new tables.
Yours is simple...
May 22, 2014 at 5:34 pm
Would something like this help?
I included some commented code to help you to test.
DECLARE @str varchar(100), @str1 varchar(120) = ''
SET @str = '11111111112222222222333333333344444444445555555555666666666';
WITH E1(n) AS(
SELECT 1...
May 22, 2014 at 5:17 pm
I might have overcomplicated this, but it might be worth it. Unless someone else comes with a better version of this. If you want to go further, you can generate...
May 22, 2014 at 4:31 pm
The problem is that OBJECT_NAME expects an int value and l.resource_associated_entity_id is a bigint.
Maybe changing the last condition would solve the proble, but I'm not sure if it will give...
May 22, 2014 at 1:06 pm
May 21, 2014 at 3:47 pm
What's the type of your begindate column?
For performance advice, read the following article: http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
May 21, 2014 at 1:30 pm
There might not be any need to go to SSIS.
If you have some kind of primary key, you could use it to generate all the files with a cursor.
DECLARE @id...
May 21, 2014 at 11:45 am
If you have more than one level, you could use a recursive CTE.
create table #Parent
(
PKint primary key not null,
Descrvarchar(10) not null,
Reference_PKint ...
May 21, 2014 at 8:21 am
There's still nothing I can do to help because I don't understand what do you need. You said something about an update, but there's nothing there that could be modified...
May 20, 2014 at 7:57 pm
There's not much we can do for you. You didn't share the stored procedure, you just copied a select statement. We don't know your environment and the requirement is unclear.
If...
May 20, 2014 at 6:23 pm
I'm not sure what would you consider simple.
If you're able to store your xml in a table without the xml, you could easily update the table. The problem with this...
May 20, 2014 at 4:33 pm
Thank you for the feedback. If I'm not mistaken, you could select both. 😀
May 20, 2014 at 2:07 pm
Viewing 15 posts - 6,421 through 6,435 (of 8,731 total)