Viewing 15 posts - 11,131 through 11,145 (of 15,376 total)
mandoswork (8/1/2012)
August 1, 2012 at 9:36 am
oolawole (8/1/2012)
August 1, 2012 at 9:31 am
--edit--
Your structures appear to be suffering greatly from a lack of normalization.
August 1, 2012 at 9:07 am
morepainot (8/1/2012)
GO
CREATE PROCEDURE syd_StagedCols_DT_Differ_SourceCols
@ApplicationName VARCHAR(100)
,@SourceDatabaseName VARCHAR(100)
,@SQL_str NVARCHAR(max) OUT...
August 1, 2012 at 9:06 am
Mark Eckeard (8/1/2012)
I believe "if exists" has to be used in the where clause and that's causing the issue.
You can't use IF EXISTS in a where clause. The IF statement...
August 1, 2012 at 9:02 am
mandoswork (8/1/2012)
Thanks both of you. I replaced the line:EXECUTE sp_Executesql @SQLQuery, @ParamDefinition, @counter_txt
with:
EXECUTE(@SQLQuery)
and it ran. I obviously need to go and read up on this.
Thanks again
Why do you...
August 1, 2012 at 8:43 am
morepainot (8/1/2012)
August 1, 2012 at 8:32 am
oolawole (8/1/2012)
I have corrected the errors and even tested it
OK so now we have ddl and sample data. What is the question? Can you tell us what the desired output...
August 1, 2012 at 8:19 am
I updated this query withouth using loops. Its the same stored procedure from before, just reworked. It would be great if you guys could give me some input, thanks.
Well...
August 1, 2012 at 8:06 am
Charlottecb (7/31/2012)
I'm only going to insert the rows for the passed in customers and I'm only going to select the rows for the passed in customers. The example data...
July 31, 2012 at 3:44 pm
With regard to your comment about being easier to do this with proper dates as opposed to separate months and years - I'd be happy to adjust the structure to...
July 31, 2012 at 3:41 pm
So your process is going to insert rows into the original table? And then you are going to select all the rows from the table regardless of which Customer IDs...
July 31, 2012 at 3:33 pm
I am a little late to this one but...
I need to return 12 months (12 records) per passed in Customer.
Your desired output does not come close to this.
CustID 1...
July 31, 2012 at 3:20 pm
The reason for the error has been identified.
Please tell me, what is the worng with SP?
However nobody really addressed this question. Honestly I see a lot of things not necessarily...
July 31, 2012 at 2:45 pm
Try running your code in an empty database. There are dozens of errors. It would also be preferred if you can use IFCode shortcuts (over on the left when posting)....
July 31, 2012 at 12:16 pm
Viewing 15 posts - 11,131 through 11,145 (of 15,376 total)