Incremental number prob

Hi there,
I am using this code to insert multiple record with increment
<%
For i = 1 To request("times")
if request("Submit") <> "" Then
rs_sticker.addnew
rs_sticker("invoice_no") = request("inv_no")
rs_sticker("count") = i + (rs_max.Fields.Item("ct").Value)
rs_sticker.update
end if
next
%>
Now my concept is to insert the incremental numbers to my
records, here is
my prob
i want this way :
invoice no count
1 1
1 2
1 3
2 4
2 5
2 6
3 7
3 8
But it seems its not working, i want it the way i mentioned
above pls help
me,
Regards
Rajiv

Can you ever have more than I record have the count "1"?
Let's say you enter
orders today and then some tomorrow, can you have:
TODAY:
invoice no count
1 1
1 2
2 3
2 4
TOMORROW:
invoice no count
3 1
3 2
4 3
4 4
The reason I ask is if you can't have more than one count
"1"...than you
could let the database handle the sequential numbering.
"Rajiv Vaishnav" <[email protected]> wrote in message
news:f60cr3$htg$[email protected]..
> Hi there,
>
>
> I am using this code to insert multiple record with
increment
>
> <%
>
> For i = 1 To request("times")
> if request("Submit") <> "" Then
> rs_sticker.addnew
> rs_sticker("invoice_no") = request("inv_no")
> rs_sticker("count") = i +
(rs_max.Fields.Item("ct").Value)
> rs_sticker.update
> end if
> next
>
> %>
>
>
> Now my concept is to insert the incremental numbers to
my records, here is
> my prob
>
> i want this way :
>
> invoice no count
> 1 1
> 1 2
> 1 3
> 2 4
> 2 5
> 2 6
> 3 7
> 3 8
>
> But it seems its not working, i want it the way i
mentioned above pls help
> me,
>
> Regards
> Rajiv
>

Similar Messages

  • How to add increment number to file name properly

    Hi, all:
    I have a simple question. As shown in the attached code, I need to add an increment number to file name and save the file. The problem is, if you run the code and put something like ".dat" in the extension name, you will see a blank space between the number and the dot in the file name. What should I do to eliminate the blank space? I can't specify the format of the file name since the file name would vary from case to case.
    Thanks a lot for any suggestion and correction in advance.
    Attachments:
    temp.vi ‏11 KB

    Hi,
    Please take a look to the attached VI. I hope that I understood what you really want.
    I've replaced the Vi: Format into string with Number to Decimal String plus a Concatenate String. 
    Now, this is working for me, I don't get a space anymore.  If something is wrong, please let me know.
    Regards,
    Paul
    Attachments:
    temp_back.vi ‏11 KB

  • ITunes appends incrementing number to file name

    Hi,
    I noticed that with some of my mp3 files iTunes 6 keeps on creating copies of them, appends an incrementing number to the file name and adds the new file to my iTunes library, which means I end up with multiple copies of the same song in my library.
    So if I have got a file called "03 All I Need.mp3" iTunes will create
    03 All I Need 1.mp3
    03 All I Need 2.mp3
    03 All I Need 3.mp3
    etc...
    Perhaps it could be related to the fact that I have got two computers accessing the same mp3 folder via a network?
    I really can't explain to myself why iTunes would be doing this, but it is terribly annoying, as I end up with the same song over and over again in my iTunes library.
    Does anybody know how I can prevent iTunes from doing that?
    Thanks heaps!

    Hi,
    Please take a look to the attached VI. I hope that I understood what you really want.
    I've replaced the Vi: Format into string with Number to Decimal String plus a Concatenate String. 
    Now, this is working for me, I don't get a space anymore.  If something is wrong, please let me know.
    Regards,
    Paul
    Attachments:
    temp_back.vi ‏11 KB

  • Incrementing Number on Adobe Designer 7.0 Form

    Hello -
    I am wanting to create a PO form where an incrementing number gets applied to a field each time a user opens the form. The user is creating a purchase order, and instead of using preprinted-paper forms he/she wants to use an Adobe form. I have created the entire form in Adobe Designer 7.0, however, I cannot seem to get an incrementing number to be calulated/populated into a field. The form then gets mailed to others, however, when they open the form the number should not change because it is already populated. It should only populate (and increment the counter) when the field is blank (i.e. a new purchase order is being created).
    I got something like this to work in Acrobat Pro 6.0 using a "global tracking number"....
    Please help.
    Thank you.
    Rick

    I'm not familiar with the "global tracking number" functionality you are referring to (I couldn't find any such beast in Acrobat 7 Pro), but it would seem to me that what you need is some sort of database connectivity. The PO number field would be the index on a PO table. If the customer is intent on keeping the PO numbers unique, would they not be tracking these is some sort of database repository?

  • Incrementing Number in Header

    Is there a way to add an incrementing number (like a PO number) in the header section of the form?  The number would be automatically generated when a form is requested and people filling out the form would not be able to edit the number?  

    We do not currently support this feature but you can vote for it here : http://forums.adobe.com/ideas/1047

  • How to incrementally number selected rows?

    I want to number the left-hand column of rows in my table. I realise I can just go from cell to cell and number them incrementally but I hoped there was an automatic way to achieve the same result.
    I can select the column of rows beginning with the one where I want the numbering to begin, but I can't find any way to incrementally number these selected rows. No help in the Pages help file either. I seem to remember that in Microsoft word I just had to select the column and then click on a 'Numbering' button on the menu.
    Thanks.
    Message was edited by: esmonde
    Message was edited by: esmonde

    Welcome to Apple Discussions
    Number the first two rows in your table, select both cells & click the little circle at the lower right of the selection box. Now drag down as many rows as you want to fill. This picture is from a Numbers table, but the fill feature works the same in a Pages table. You can see that you can create increments other than one.

  • Re auto increment number

    Hi experts
                          i had a fms query for auto increment number  for a field  query is
    SELECT 'HB#'+cast((MAX(SubString(U_VSPPROJ,4,Len(U_VSPPROJ)))+1)  as Varchar(4))  from ORDR where U_VSPPROJ Like 'HB#%%'
    gives a result of  HB#1 to HB#999 this is for financial year 13-14 but now i want to reset it from HB1 for this FI year how can i do that
    Please help me on this
    Regards
    Prathap

    Hi
    The Query is
    SELECT 'HB#'+cast((MAX(SubString(U_VSPPROJ,4,Len(U_VSPPROJ)))+1)  as Varchar(4))  from ORDR where U_VSPPROJ Like 'HB#%%'
    given a result of  HB#1 to increasing +1 value in previous year 2013-14
    now i want same from HB#1 in this fi year  2014-15
    how to reset it from HB#1 from this f year
    please help me on this
    Thanks and Regards
    Prathap

  • Title with incremental number -- how to approach this when editing in Premiere CS4

    Ok, I'm not sure if this is possible, but here is what I would like to accomplish:
    I've recorded a Tour in Google Earth Pro - you know the camera 'flying' from placemark to placemark. I've measured the amount of kilometers between placemarks. What I would like to do is to display a title/number in the left top of the screen in Premiere which displays the number of KMs traveled, incrementing when the camera flies. I need dynamic text that increments e.g. from 0 to 2000 KMs from frame 1 to 500. I'm not sure which approach is best to accomplish this, and if it can be accomplished inside of Adobe Premiere. Thanks for the support. Best regards,

    You may have to look at After Effects for something like this.

  • Auto increment number in BO

    Hello All,
    In my CAF code, I need to persist one variable and increment in every time the AS is called. To elaborate further, I have a business object (entity service) which stores the customer records. The customer number has to be auto incremented. The response of this service is the customer number which is auto generated.
    Please let me know how to go about it simplistically. Do we have the concept of static variables, the same of instance of which can be accessed by various service calls?
    Thanking you all in anticipation.
    Regards,
    Keerti

    Hi Keerthi,
    You can use the concept of static.
    If i had understood correctly, you need to have an operation in Application Service(AS) to create a Customer BO and each time  a customer BO is formed it shopuld be given a customer ny=umber in an auto increment fashion.
    For this you can have the following code in your create method of the AS
    try {
                   StatObj ob = this.getstatObjService().create();
                   i++;
                   ob.setCustNumber(i);
                   this.getstatObjService().update(ob);
              } catch (CAFCreateException e) {
              } catch (CAFUpdateException cue) {
              } catch (CAFPessimisticLockException cple) {
              } catch (CAFOptimisticLockException cole) {
    StatObj is my BO and CustNumber is an int in the BO.
    Hope it solves your problem.
    Hi keerthi,
    Is the problem solved.
    Regards,
    Srinivasan Subbiah
    Edited by: Srinivasan Subbiah on Apr 28, 2008 8:55 AM

  • Auto increment number field

    Hello,
    I would like to have a number field to be auto increment. Ho can I do that in Oracle must I use some code for it or can I make the field auto increment by itself.
    Thanks

    user3311314 wrote:
    Hello,
    I would like to have a number field to be auto increment. Ho can I do that in Oracle must I use some code for it or can I make the field auto increment by itself.
    ThanksIt's a long standing gripe of mine. You must use code, and the appropriate solution is a sequence and a trigger, eg
    SASH_CLIENT @ DB10G >create table t(
      2      id number not null primary key
      3  ,   c1 char(100));
    Table created.
    SASH_CLIENT @ DB10G >
    SASH_CLIENT @ DB10G >create sequence seq_t;
    Sequence created
    SASH_CLIENT @ DB10G >
    SASH_CLIENT @ DB10G >create or replace trigger bir_t
      2  before insert on t
      3  for each row
      4  begin
      5  select seq_t.nextval into :new.id from dual;
      6  end;
      7  /
    Trigger created.
    SASH_CLIENT @ DB10G >insert into t(c1) values ('row 1');
    1 row created.
    SASH_CLIENT @ DB10G >commit;
    Commit complete.
    SASH_CLIENT @ DB10G >select * from t;
            ID C1
             1 row 1I'd much prefer
    create table t (
       id number primary key default seq_t.nextval
    ,  c1 char(100));

  • ACE show serverfarm - failure counter does not incremented on Probe-Failure event

    Hi,
    Despite of probe-failure the failure counter is not incremented. Is there any correlation between the configured probe and the failure counter?
    (Custom script probe is used for this serverfarm)
    # sh serverfarm xxxxxSt
    serverfarm     : xxxxxSt, type: HOST
    total rservers : 2
                                                    ----------connections-----------
           real                  weight state        current    total      failures
       ---+---------------------+------+------------+----------+----------+---------
       rserver: xxxxx6
           10.222.0.90:8000      8      OPERATIONAL  13         157        0
       rserver: xxxxx7
           10.222.0.92:8000      8      PROBE-FAILED 0          0          0
    Thanks,
    Attila

    Hi Attila,
    The Connection Failure counter under show serverfarm is for Loadbalanced Connections which are failing.
    If Probes are failing, this counter will not increment.
    The Connection failure counter can increment for various reasons some of them are,
    - Server not responding to the SYN packet sent by ACE for Loadbalanced connection
    - Server sending Reset to the SYN packet sent by ACE for Loadbalanced connection
    To check on stats for Probe, you can run "show probe detail" command.
    Hope this helps,
    Best Regards,
    Rahul

  • Is there easy way to create auto increment number?

    Hello SharePoint Fam,
    Is there a easy solution to have a auto increment column that just creates new number on each new item.
    Wanting something like:
    14-0001
    14-0002
    14-0003
    14-0004
    14-0005
    Thanks n advance

    If you need a simple auto increment column then you can use "ID" field which is already present in Sharepoint. 
    It will increment in this fashion: 1,2,3,4...........
    or
    you can take field as "Calculated" and use formula (="14-" & [ID]) without parentheses.
    it will increment in this fashion 14-1, 14-2, 14-3............
    or
    try this link...may be you will find something helpful here...
    http://dlairman.wordpress.com/2011/01/10/add-a-unique-auto-incrementing-column-to-a-sharepoint-list/
    ***If my post is answer for your query please mark as answer***
    ***If my answer is helpful please vote ***

  • Incremental number assigned to adobe form field upon opening form

    I have a form posted on the web that clients fill out and submit when they hire a new employee.
    Is there a way to have a number populate in a field incrementally that does not repeat.  For instance if the form is opened by user 1, it gets Form 1, then later user 2 gets Form 2.  The number would not repeat.
    .  Any thought?

    Form fields can't directly-communicate with a webserver except during the submit process, so you can't use the same counter tools that websites use. There are some options to allow PDF forms to pull data from remote servers (using Flash) when the document opens, but again it will require some code on the server to send the correct information, and creates problems if the person filling in the form is offline at the time (or denies the network connection dialog). Using a timestamp field solves the problem of your users being offline, but it's only going to give you a pseudo-unique code (there's a tiny chance two forms could get the same value if they were opened at the same time) and of course the value you get is huge - not the sort of thing you'd want as an employee number.
    Setting up something in PHP or ASP to run the type of XFDF/FDF workflow I show in the video isn't difficult, and the code will run on any web host which supports those languages. You don't need a special type of server.

  • Function to Generate a Sequential incremental Number by Group of Records

    I have a table with several columns and I need to compute a sequential number by group of records
    FIELD1 FIELD2 FIELD3 FIELD4 FIELD5
    AAAAAA A1 JOHN 01/01/61 NULL
    AAAAAA A3 PAUL 01/01/71 NULL
    AAAAAA A3 MARY 01/01/02 NULL
    AAAAAA A4 CARL 01/01/04 NULL
    BBBBBB A1 MARK 01/01/60 NULL
    BBBBBB A2 ALLY 01/01/60 NULL
    BBBBBB A5 JUAN 01/01/04 NULL
    I need to compute FIELD5. This is defined as a number field.
    Records where FIELD2 = A1 the default value for FIELD5 is zero.
    I am grouping records by FIELD1, FIELD4
    The value for FIELD5 will be assigned from 1 TO 1+N
    For this sample, the resulting records will look like this;
    FIELD1 FIELD2 FIELD3 FIELD4 FIELD5
    AAAAAA A1 JOHN 01/01/61 0
    AAAAAA A3 PAUL 01/01/71 1
    AAAAAA A3 MARY 01/01/02 2
    AAAAAA A4 CARL 01/01/04 3
    BBBBBB A1 MARK 01/01/60 0
    BBBBBB A2 ALLY 01/01/60 1
    BBBBBB A5 JUAN 01/01/04 2
    Question: Can I create a function that loops through the table and compute the value for FIELD5?

    I like this idea, but because F2 must always have the value of ZERO I decided to create a procedure to calculate the value for F5.
    My procedure is below;
    The issue I am having is that I am not sure;
    1) When/where to set/reset the counter ?
    2) Determine in the inner loop if I am still whithin the same group of records ?
    3) When to update the new found value for MBR_MBR_DEP_CD field ?
    CREATE OR REPLACE PROCEDURE LC_BUILD_DEP_CODE_PROC IS
    V_ALT_ID VARCHAR2(30);
    V_EMPLOYEE_SSN VARCHAR2(9);
    --RELATIONSHIP_CD VARCHAR2(2);
    --MBR_DOB         DATE;
    V_ALT_ID_2 VARCHAR2(30);
    V_EMPLOYEE_SSN_2 VARCHAR2(9);
    V_MBR_DEP_CD_2 NUMBER(2,0);
    V_MBR_DEP_COUNTER INTEGER :=0;
    /* FIRST CURSOR */
    CURSOR GET_FAM_ALT_ID IS
    SELECT FAM.ALT_ID,
    FAM.EMPLOYEE_SSN
    FROM TPA_MBR_STG FAM
    WHERE FAM.RELATIONSHIP_CD = '18'
    ORDER BY FAM.ALT_ID;
    /* SECOND CURSOR */
    CURSOR GET_MBR_DEP_CD IS
    SELECT MBR.ALT_ID,
    MBR.EMPLOYEE_SSN,
    MBR.MBR_DOB,
    MBR.MBR_DEP_CD
    FROM TPA_MBR_STG MBR
    --WHERE MBR.ALT_ID = V_ALT_ID
    --AND   MBR.EMPLOYEE_SSN = V_EMPLOYEE_SSN
    WHERE MBR.RELATIONSHIP_CD <> '18'
    ORDER BY MBR.ALT_ID, MBR.MBR_DOB;
    BEGIN
    -- OPEN FIRST CURSOR
    OPEN GET_FAM_ALT_ID;
    LOOP
    FETCH GET_FAM_ALT_ID INTO V_ALT_ID,
    V_EMPLOYEE_SSN;
    OPEN GET_MBR_DEP_CD;
    FETCH GET_MBR_DEP_CD INTO V_ALT_ID_2,
    V_EMPLOYEE_SSN_2;
    IF V_ALT_ID_2 = V_ALT_ID
    AND V_EMPLOYEE_SSN_2 = V_EMPLOYEE_SSN
    THEN
    LOOP
    V_MBR_DEP_COUNTER = V_MBR_DEP_COUNTER + 1;
    UPDATE TPA_MBR_STG
    SET MBR_MBR_DEP_CD = V_MBR_DEP_COUNTER;
    END LOOP;
    END IF;
    CLOSE GET_MBR_DEP_CD;
    V_MBR_DEP_COUNTER :=0;
    END LOOP;
    CLOSE GET_FAM_ALT_ID;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR(-20001,'AN ERROR WAS ENCOUNTERED - '||SQLCODE||' -
    ERROR- '||SQLERRM);
    END LC_BUILD_DEP_CODE_PROC;

  • Incrementing number in psd AND file name

    Hi,
    I would like to create files that contain a number (aka title n°1, title n°2, title n°3...) and save them with that same number. I don't seem to find any info on the subject. Can anyone help ?
    Thanks.

    duplicate post
    Ask your question only once.

Maybe you are looking for

  • PL/SQL: ORA-00947

    Hi, I have a package body as given below CREATE OR REPLACE PACKAGE BODY DF AS     FUNCTION T24_GetCOPYBatchKeyAndDate(RECKEY VARCHAR2)         RETURN RTNVAL         IS         RTNVAL1 RTNVAL;          DELPOS    INTEGER;         LISTSTRING VARCHAR2(40

  • GR/IR entry problem

    Hi We have posted one invoice through MIRO in the year 2005. And in the same year payment also happened for that invoice. But customer has raised a ticket why this invoice is showing as not cleared in FBL1N. If i see that invoice in MIRO follow up do

  • Re: Problem installing WLAN device for Satellite A100-813

    Hello, I recently formated my laptop and went to toshiba driver download section. And downloaded and installed all of the drives except my LAN NIC and WLAN NIC. I tried download all the driver models but still wont install. I tried switching the WLAN

  • I have sound but no picture

    I am trying to watch movies that i have recored on to an SD card and when I try to watch them using Quicktime i get the audio but a blank white screen. Can anyone help?

  • How to download org model from R/3 to CRM.

    Dear Friends,                  How to download Org model  from R/3 to CRM. Any one tell me step by step detaily. Regards, Raj kumar, 08123667379