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.
| Author |
Topic |
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2011-06-27 : 01:09:14
|
hoew can i create numerator on viewi have view:customerNOcustomer-->newId 123 'Custoemr1' 1123 'Custoemr1' 2123 'Custoemr1' 3 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-06-27 : 02:07:20
|
SELECT CustomerNO, Customer, ROW_NUMBER() OVER (ORDER BY CustomerNo) AS [NewID]FROM dbo.Table1 N 56°04'39.26"E 12°55'05.63" |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-06-27 : 02:50:36
|
How do you want the newId to go on if the customerNO is changing? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2011-06-27 : 04:02:26
|
| i create the table every night in newly |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-06-27 : 04:26:28
|
That was not my question  quote: Originally posted by inbs hoew can i create numerator on viewi have view:customerNOcustomer-->newId 123 'Custoemr1' 1123 'Custoemr1' 2123 'Custoemr1' 3234 'Customer2' 4 or 1 again?
No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
williamku87
Starting Member
6 Posts |
Posted - 2011-06-27 : 04:36:57
|
quote: Originally posted by webfred That was not my question  quote: Originally posted by inbs hoew can i create numerator on viewi have view:customerNOcustomer-->newId 123 'Custoemr1' 1123 'Custoemr1' 2123 'Custoemr1' 3234 'Customer2' 4 or 1 again?
No, you're never too old to Yak'n'Roll if you're too young to die.it will start 4...
|
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-06-27 : 04:48:04
|
quote: Originally posted by williamku87
quote: Originally posted by webfred That was not my question  quote: Originally posted by inbs hoew can i create numerator on viewi have view:customerNOcustomer-->newId 123 'Custoemr1' 1123 'Custoemr1' 2123 'Custoemr1' 3234 'Customer2' 4 or 1 again?
No, you're never too old to Yak'n'Roll if you're too young to die.it will start 4...
Yes, I know it will with the given solution.But my question is if it SHOULD... No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|