Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Update Statement

Author  Topic 

dtrivedi
Posting Yak Master

153 Posts

Posted - 2010-10-26 : 10:38:46
is this update statement wrong??

update [h0_Stores] set [Code_S5] = 1 where [Loc0]=(1034,
1052,
1058,
1062,
1108,
1109,
1110,
1112,
1113,
1114,
1116,
1118,
1119,
1122,
1123,
1124,
1125,
1130,
1201,
1234,
1301,
1304,
1306,
1307,
1731,
1831,
2032,
2033,
2034,
2037,
2039,
2040,
2046,
2051,
2052,
2053,
2054,
2058,
2060,
2063,
2066,
2068,
2073,
2081,
2082,
2084,
2088,
2089,
2090,
2092,
2093,
2094,
2096,
2099,
2108,
2112,
2115,
2116,
2117,
2118,
2119,
2123,
2124,
2125,
2126,
2127,
2201,
2202,
2203,
2204,
2205,
2206,
2301,
2500,
2502,
2503,
2505,
2506,
2507,
2508,
2853,
2854,
2902,
2951,
2952,
2953,
2955,
2956,
2958,
2959,
2960,
3006,
3008,
3251,
3253,
3255,
3258,
3259,
3263,
3264,
3265,
3266,
3270,
3300,
3303,
3308,
3309,
3312,
3317,
3319,
3320,
3329,
3330,
3400,
3401,
3701,
3705,
4011,
4014,
4021,
4022,
4025,
4028,
4039,
4040,
4104,
4106,
4111,
4114,
4115,
4116,
4117,
4118,
4120,
4123,
4128,
4129,
4202,
4204,
4263,
4303,
4305,
4306,
4352,
4353,
4354,
4355,
4362,
4363,
4364,
4365,
4367,
4368,
4369,
4371,
4373,
4376,
4378,
4379,
4381,
4382,
4383,
4384,
4386,
4389,
4390,
4391,
4392,
4393,
4397,
4400,
4401,
4402,
4450,
4456,
4461,
4463,
4465,
4466,
4505,
4507,
4513,
4515,
4517,
4600,
4900,
4901,
4902,
4903,
4917,
4929,
4930,
4933,
4936,
4937,
5005,
5010,
5013,
5014,
5016,
5017,
5020,
5023,
5024,
5027,
5029,
5042,
5043,
5044,
5046,
5047,
5048,
5049,
5050,
5053,
5056,
5057,
5058,
5059,
5060,
5061,
5062,
5064,
5065,
5067,
5068,
5077,
5079,
5080,
5081,
5082,
5103,
5106,
5109,
5110,
5111,
5112,
5115,
5116,
5118,
5120,
5121,
5122,
5124,
5131,
5132,
5135,
5137,
5140,
5141,
5142,
5143,
5144,
5145,
5146,
5153,
5400,
5503,
5504,
5550,
5551,
5552,
5554,
5558,
5563,
5565,
5566,
5567,
5568,
5570,
5571,
5573,
5575,
5576,
5577,
5578,
5581,
5582,
5584,
5585,
5589,
5590,
5591,
5600,
5603,
5604,
5605,
5612,
5613,
5614,
5618,
5620,
5621,
5624,
5632,
5635,
6004,
6014,
6022,
6024,
6034,
6038,
6049,
6050,
6052,
6053,
6101,
6108,
6109,
6110,
6112,
6113,
6114,
6115,
6505,
6506,
6508,
6550,
6551,
6552,
6553,
6555,
6557,
6700,
6701,
6705,
6707,
6709,
6710,
6712,
6714,
6715,
6719,
6720,
6721,
6724,
6726,
6727,
6728,
6729,
6732,
6733,
6735,
6740,
6741,
6742,
6744,
6746,
6752,
6800,
6904,
6905,
6930,
6932,
6933,
6934,
6935,
6937,
6938,
6940,
6955,
6957,
6980,
6981,
6999,
7000,
7006,
7014,
7015,
7101,
7102,
7103,
7107,
7200,
7205,
7206,
7209,
7211,
7212,
7219,
7307,
7308,
7309,
7310,
7313,
7314,
7315,
7316,
7317,
7318,
7319,
7320,
7321,
7322,
7323,
7330,
7332,
7334,
7342,
7343,
7352,
7353,
7357,
7358,
7359,
7361,
7363,
7364,
7367,
7368,
7370,
7371,
7372,
7373,
7374,
7376,
7377,
7378,
7383,
7522,
7523,
7539,
7546,
7549,
7558,
7563,
7565,
7569,
7573,
7574,
7577,
7578,
7579,
7582,
7583,
7586,
7589,
7591,
7597,
7703,
7753,
7801,
7809,
7828,
7857,
7860,
7897,
7903,
7904,
7905,
7906,
7909,
7910,
7911,
7922,
7930,
7932,
7933,
7934,
7937,
7938,
7953,
7956,
7957,
7958,
7960,
7962,
7970,
7971,
7979,
7980,
7981,
7987,
7988,
7994,
7996,
7997,
7998,
8005,
8008,
8009,
8101,
8109,
8110,
8200,
8201,
8204,
8501,
8504,
8505,
8506,
8512,
8513,
8515,
8600,
8602,
8603,
8604,
8605,
8704,
8705,
8750,
8755,
8756,
8757,
8763,
8764,
8765,
8766,
9001,
9500,
9501,
9502,
9503,
9504,
9505,
9506,
9507,
9508,
9511,
9513,
9514,
9985)

dtrivedi
Posting Yak Master

153 Posts

Posted - 2010-10-26 : 10:43:39
I need to change all of the code-S5's to one for the specifed locations
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-10-26 : 11:06:25
where [Loc0] IN(1034,...



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

dtrivedi
Posting Yak Master

153 Posts

Posted - 2010-10-26 : 11:19:28
thank thank than kyou...i'm such an idiot.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-10-26 : 11:35:06
No - not an idiot.
That happens to all of us sometimes


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -