Avatar of Queennie L
Queennie L
 asked on

Add number to New Column if the row starts at AAA with 1 in the Same Filename

Hello Experts,

I have SQL table columns:
UniqueID
Filename
DataName

NewColumn

If the Filename starts with AAA in row then 1, if there are more than AAA in rows with the same filename then starts with 1 then 2 then 3 in NewColumn.

Please see attach file.

Thank you for all your help.
Add-number-to-New-Column-if-the-row.xlsx
Microsoft SQL ServerSQL

Avatar of undefined
Last Comment
Queennie L

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ryan Chong

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Queennie L

ASKER
@Ryan Chong,

I will test your code. I will let you know.

Thank you again for your help.
Queennie L

ASKER
@RyanChong:

OMG! It is working.

Thank you and Thank you again and again for your help.

I really appreciate it for you intelligence and expertise.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck