Viewing 15 posts - 31 through 45 (of 86 total)
Hi Smith,
Apologies for the same :-
insert into sales (ID,Sales_Jan,Sales_Feb,Sales_Mar,Sales_Apr,Sales_May)
values
(1,100, 0,0,0 ,0 )
insert into sales (ID,Sales_Jan,Sales_Feb,Sales_Mar,Sales_Apr,Sales_May)
values
(2,120,0,200,300,0)
insert into sales (ID,Sales_Jan,Sales_Feb,Sales_Mar,Sales_Apr,Sales_May)
values
(3,0,100,0,300,0)
insert into sales (ID,Sales_Jan,Sales_Feb,Sales_Mar,Sales_Apr,Sales_May)
values
(4,100,200,100,100,100)
insert into sales (ID,Sales_Jan,Sales_Feb,Sales_Mar,Sales_Apr,Sales_May)
values(5,100,0,100,100,100)
--- Sales ID to populated is...
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
January 9, 2012 at 2:01 am
Hi Jeff/Gila Monster,
It was just an example 😛 to help someone who posted a query in some other thread for "How to delete tables within a DB following some pattern...
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
December 5, 2011 at 1:48 am
What I mean is the data is normalized in the table but I have created a derived column by concatenating the columns 🙂 .
I just wanted a way to match...
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
November 28, 2011 at 11:09 am
Sean u had me ...The data is very well normalized but I wanted to know a logic to match such data other than normalizing it (out of curiosity :hehe: and...
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
November 28, 2011 at 10:24 am
Thanks Cadavre,
Wish you many more centuries for providing the solution.
Thanks,
Ankit
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
November 28, 2011 at 3:48 am
Cause the client requirement is like that 🙂 .
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
November 28, 2011 at 3:45 am
Thanks Gina
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
November 28, 2011 at 3:42 am
Hi Gila,
Thanks for your reply. The data is normalized but I have concatenated fields separated by "/". I want to now populate ID to these fields with fields eg: ...
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
November 25, 2011 at 11:07 am
Thanks cold coffee,
But I was looking for solution that Adi provided. I hope you too would appreciate his code.
Regards,
Ankit
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
November 22, 2011 at 1:27 am
Thanks Adi this is perfect and clears my concept on Joins as well.
Regards,
Ankit
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
November 22, 2011 at 1:22 am
Sean Lange (10/15/2011)
Are you getting an error message? "Not working for me" doesn't give me much to go on. 😀
If I execute
DECLARE @QUERY NVARCHAR(MAX)SET @QUERY = N'SELECT 1'EXECUTE sp_executesql...
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
October 15, 2011 at 11:47 pm
Sean Its not working for me ?
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
October 15, 2011 at 8:40 am
Lynn Pettis (10/14/2011)
If you are getting errors, it would help to know the errors for one.
Lynn,
1.the DPPEngine Proc is creating queries and storing into Queries table.
2.Superb cursor is executing these...
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
October 15, 2011 at 12:41 am
Sean Lange (10/14/2011)
Your post wasn't showing up on the active threads.
EXECUTE sp_executesql N'USE Rule_DB; EXEC [DPPEngine] ''MIGRATION_DB'',''Filteration-1,Mapping,Mapping-dvt,Mapping-Update1,Filteration-2,Pre-Cflag,CFlag,InSourceMerging,CS-1'',''v4.0'', @SOURCEID'
Sean, Thanks for your help.
The ";" after Rule_DB is making @Sourceid...
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
October 15, 2011 at 12:36 am
Am I missing some information or is it Friday that is keeping people busy ?
______________________________________________________________________
Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
October 14, 2011 at 12:03 pm
Viewing 15 posts - 31 through 45 (of 86 total)