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
 Development Tools
 ASP.NET
 plz hekp me

Author  Topic 

Dansl071282
Starting Member

4 Posts

Posted - 2010-08-28 : 12:51:01
Hi.

Even does not know if this forum is the suitable
I have sql table with "division" i have column " name division " and "code division" ok.

NAME DIVISION
CODE DIVISION

TRANSPORT
1000

ELECTRICITY
2000


AND THIS DATA DISPLAY IN COMBOBOX.

Now User wont to add new company UNDER DIVISION "TRANSPORT" he is select in combobox value " TRANSPORT" AND CODE 1000 OK

NOW I NEED AUTOMATICLY TO GIVE NEW (show to user in textbox) CODE TO COMPANY for example 1000\1 because he chose transport division (code division 1000) but before i give the new code to new company i need to check if not already company with identical code if not to take a last company with 1000\n and add 1 example 1000\n+1 and put the new company name with new code 1000\n+1 to some table in sql or acces.

IN THE END I NEED TO PUT INTO THE TABLE THIS VALUES

COMPANY NAME
COMPANY CODE

TRANSAUTO
1000\1

EUROTRANS
1000\2




Diagram like this

I have code 1000 now I go in to sql table CUSTOM2 and seeks a company with code 1000\max_num after obtained the company with the maximum code I adds to the code + 1(1000\max+1) and display the cod in new text box/

Request will help me very important matter for me.
I have code which get max value from sql table but this value 1000 not 1000\1 how i can to find max value in this format 1000\1?
thanks

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-08-28 : 16:13:07
The more you are giving duplicate posts the less answers will be given.
Don't do that!
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=149459
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=149461
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=149460



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

- Advertisement -