Results 1 to 13 of 13
  1. #1
    Join Date
    Aug 2010
    Posts
    14

    Smile Unanswered: autogenerating alphanumeric character..

    hi guys, i want to autogenrate alphanumeric character.

    example - for getting diff and unique ids ina particuklar column, i want to generate ids....like

    a1102
    a1102
    a1103
    a1104
    a1105

    last digit..changing.

    for integer autogenerating we use serial keyword but what to do here? :confused

    thanks

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Simply use a sequence and a trigger to populate your ID (a serial is nothing more than an integer with a default value taken from a sequence). In the trigger you retrieve the next value from the sequence and append that to the 'a' and store it in your ID column.

  3. #3
    Join Date
    Aug 2010
    Posts
    14

    @shammat

    y dnt u write in details? me dull..donno nythng..explain wid examples....

  4. #4
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by sahendramansingh View Post
    y dnt u write in details? me dull..donno nythng..explain wid examples....
    Sorry what language are you writing in?

    What's a dnt?
    What's a wid?
    What's a "dunno nything"?

  5. #5
    Join Date
    Aug 2009
    Location
    Olympia, WA
    Posts
    337
    We've asked you several times to write in English. Before we did it in a sarcastic way, but subtlety seems lost on you so I'll break it down for you. The folks answering your questions here are database professionals. Most of us have multiple degrees, a decade or more of experience and pull down 6 figure salaries. We're not going to waste our time on what looks like a 12 year old who is texting on his Dad's droid.

  6. #6
    Join Date
    Aug 2010
    Posts
    14

    We've asked you several times to write in English. Before we did it in a sarcastic wa

    i guess ur talkign abt US english. if UK english thn u wud nt hv askd such ques. hmm power of 6digits hmm wow good congoo to u. bt learn smthgn else alng wid database. nobosy insisted u to write. if u can understand mh ques thn qrite sle do not waste ur precious time for mh ques else salary may come dwn to 5digits:P happy learning.

  7. #7
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by sahendramansingh View Post
    i guess ur talkign abt US english. if UK english thn u wud nt hv askd such ques. hmm power of 6digits hmm wow good congoo to u. bt learn smthgn else alng wid database. nobosy insisted u to write. if u can understand mh ques thn qrite sle do not waste ur precious time for mh ques else salary may come dwn to 5digits:P happy learning.
    at this rate, you aren't going to get ~any~ help on this forum, pal

    stop composing your posts with your thumbs and stop with the "creative" spelling

    you're just pissing us off
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  8. #8
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by sahendramansingh View Post
    i guess ur talkign abt US english. if UK english thn u wud nt hv askd such ques. hmm power of 6digits hmm wow good congoo to u. bt learn smthgn else alng wid database. nobosy insisted u to write. if u can understand mh ques thn qrite sle do not waste ur precious time for mh ques else salary may come dwn to 5digits:P happy learning.
    You are now on my ignore list

  9. #9
    Join Date
    Aug 2010
    Posts
    14

    Talking you are on my ignore list?:O

    u r the one who started off. lol

    and u wanan teach e english ryt? ..u always talk abt corerct english...what abt ur sentence then "you are on my ignore list":O

    how come "on ignore list":O wat's d meaning..?

  10. #10
    Join Date
    Aug 2010
    Posts
    14

    @r937

    im gonna buy ur book for sure, provided if u can answer to mh ques:P
    where is the answer mr.author?

  11. #11
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    sahendramansingh: You are the person who is requesting help. As such, you should be doing everything possible to make your requests easy to read, and easy to understand. After all, why should ANYONE be bothered to help, if they first have to decode what you've written?

    Someone did provide help, which (if I interpret your l33t speak correctly) you apparently felt was inadequate for your level of expertise...

    Communicating database design and definition detail is difficult enough that someone giving help should not be asked to interpret what you've requested.

    We try to answer legitimate questions clearly and concisely. But, we require that you do the same when you request help.

    ***
    With postgreSQL, other approaches than shammat's are possible. Once you've acknowledged our requirement for clear and concise communication, we can discuss the matter further.
    Last edited by loquin; 09-01-10 at 18:01.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  12. #12
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    shndrmnsngh iz ofishly n mai ignr lst 2. He iz jckss.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  13. #13
    Join Date
    Aug 2010
    Posts
    14

    @blindman

    tahts wt u hv learnt ryt?..u knw how to blow off with the wind..gng along wid majority :P if u cant stand alone nd dnt knw d meanign of "against"..thn . add urself in my ignore list[:P]

    have fun buddy



    rofl..nice nick..blindman...dnt make fun of those sad people plz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •