Number and name of rows

Is there any way to know the total number and the names of the rows in a table?

Sample:
private void loadMetaData() {
int i = 0;
try {
metaData = rs.getMetaData();
int singleHtColumnType;
columnCount = metaData.getColumnCount();
for (i = 1; i <= columnCount; i++) {
columnNames[i-1] = new String(metaData.getColumnName(i));
// System.out.println("meta-look " + columnNames[i-1]);
// System.out.println(metaData.getColumnLabel(i)); // on AS/400 == columnName :-((
// System.out.println("ColumnDisplaySize: " + metaData.getColumnDisplaySize(i));
singleHtColumnType = metaData.getColumnType(i);
if (readBigDecimalAsInt & singleHtColumnType == 8) singleHtColumnType = 4;
columnType[i-1] = singleHtColumnType;
if (singleHtColumnType == 8
|| (databaseType == ConnectionHolder.DB2_400 && singleHtColumnType == 3)) {
columnScale[i-1] = metaData.getScale(i);
htColumnType.put(columnNames[i-1], new Integer(singleHtColumnType));
if (singleHtColumnType == 1 | singleHtColumnType == 12) maxFieldSize.put(columnNames[i-1], new Integer(getColumnDisplaySize(i)));
catch (SQLException e2) {
System.out.println("loadMetaData caught " + e2);
System.out.println("Index was " + i);
catch (Exception e) {
System.out.println("loadMetaData caught " + e);
System.out.println("Index was " + i);

Similar Messages

  • Importing CD to Artist folder\Album folder\file with track number and name:

    I have a problem then importing my cd’s to my harddisk using iTunes.
    On my previous pc I got what I want, Artist folder, Album folder and file with track number and name:
    e.g.
    D:\My Music\B.B. King\Blues On The Bayou\01 Blues Boys Tune.mp3
    D:\My Music\B.B. King\Blues On The Bayou\02 Bad Case Of Love.mp3
    D:\My Music\B.B. King\Blues On The Bayou\03 I'll Survive.mp3
    But now I get:
    D:\My Music\Compilations\Blues On The Bayou\01 Blues Boys Tune.mp3
    D:\My Music\ Compilations \02 Bad Case Of Love.mp3
    D:\My Music\ Compilations \03 I'll Survive.mp3
    In iTunes my settings are Edit -> Preferences -> Advanced: iTunes Music folder: D:\My Music and checkmark in both: “Keep iTunes Music folder organized” and “Copy files to iTunes Music folder when adding to library”.
    My version of iTunes is 8.0.1.11
    Thanks in advance
    Peter

    It will depend on the album. Gracenote considers anthologies, a collection of tracks by the same artist taken from different albums, as a compilation. In iTunes the compliation setting should really only be applied to a collection of tracks by different artists.
    tt2

  • I delete people in my phone number but when I go to messages I found their number and name how I can delete them

    I delete people in my phone number but when I go to messages I found their number and name how I can delete them

    There's no option to edit/delete the iPhone cache, the cache will be overwritten in time.
    If you can't wait, only restore as new can get rid of it.

  • Output SAP Mail Message - Payer Number and Name

    Hi,
    I'm trying to set up our sap system to output a message if a sales order goes into credit block. I have all this working and the last part of the request is to include the payer number and name for the sales order on the mail.
    I have set up the following against my output
    Replacement of Text Symbols
    Program: SAPMV45A
    Form Routine: TEXT_SYMBOL_REPLACE
    and then I have the following mail title:
    Sales Order on Credit Block - PAYER:&XVBAK-KNKLI&
    I would like to include the name in this, or in the text for the message but I do not know how to extract this. Any ideas?
    Many thanks,
    Steph.

    Christopher,
    if you now have set up the WSMessageListener, this one can also be called by external functions. Alternatively you can call any MII transaction as a webservice.
    For example, you can use something like this:
    http://<server>:<port>/XMII/WSDLGen/<folder>/<tran>
    You can also user the runner service (the example gives a pdf output):
    http://<server>:<port>/XMII/Runner?Transaction=<folder>/<Transaction-name>
    &<InpuParamName1>=<value1>
    &<InpuParamName n>=<value n>
    &OutputParameter=pdfOutput
    &Content-Type=application/pdf
    &isBinary=true
    &XacuteLoginName=<username>&XacuteLoginPassword=<password>
    Michael

  • How to get customer number and name from the SD document

    Hi All,
    Can you please let me know how to get Customer Number and Name from the SD Document?
    Thanks a lot....
    Anil

    Hi,
    It will be displayed in the SD (BIlling document) itself,  you clikc on the VF03. The customer name and number will also appear in the SO document also Tcode VA03
    regards,
    radhika
    Edited by: kolipara radhika on Jul 10, 2009 5:32 AM

  • DESCRIBE TABLE or similar to get number and name of a table fields

    Hi experts,
    I want to use a sentence to get the number and name of the fields contained on a table or structure, and i cannot use DESCRIBE TABLE. I cannot find a way to get that info, does anybody know a sentence or method/funcion for this?
    Thanks!!!
    Artur.

    use this FM GET_COMPONENT_LIST.
    can get list of fields also from variable which is not defined in DDIC. But has to be global.
    Michal

  • Dynamically add and modify listbox columns number and names

    I need to dynamically modify number and names of columns in a listbox.
    What should I do for this? And is it even possible?

    Frank-
    Thanks for the suggestion -- I hadn't tried that but just did and it still doesn't seem to work. Would the binding cache AttrDefs separately from results?

  • Portal infomration System Number  and Name required

    Hi all,
    I need to know few details about the portal information. I am looking for System Number  and Name of portal mainly through WD program program . Could you please help me how to find this. I promise to award points. Do I need to have any Lib/Jar files required to get this info. Program tips are most helpfull and appreciated as well.
    General way to find in portal
    Log into Portal- >System Information -> Name info (Under Database)
    Log into Portal- >System Information -> System Number info  (under Licenses)
    Thank you,
    Regards
    Maruti

    System.getProperty("SAPSYSTEMNAME");  // System ID
    System.getProperty("SAPSYSTEM");   // System Number

  • Getting the max number and show the row

    hi
    i have this table:
    MyTbl
    ====
    id | Name  |  Num
    ===========
    1  | AAA    |   0
    1  | BBB    |   1
    1  | CCC    |   2
    2  | DD     |   0
    2  | EEE    |   1
    3  | FFF    |   0
    i need to show the max Num in row order by id
    i need to see this:
    MyTbl
    ====
    id | Name  |  Num
    ===========
    1  | CCC    |   2
    2  | EEE    |   1
    3  | FFF     |   0
     i need it on sqlight (or sql-server i think is same)
    thanks

    Here is an AdventureWorks example to get the maximum list price products for each color:
    WITH CTE AS
    (SELECT RNK=DENSE_RANK() OVER (PARTITION BY Color ORDER BY ListPrice DESC),
    Color, ListPrice, ProductName=Name
    FROM Production.Product WHERE ProductSubcategoryID > 0 AND Color is not null)
    SELECT Color, ListPrice, ProductName FROM CTE
    WHERE RNK = 1 ORDER BY Color, ProductName;
    Black 3374.99 Mountain-100 Black, 38
    Black 3374.99 Mountain-100 Black, 42
    Black 3374.99 Mountain-100 Black, 44
    Black 3374.99 Mountain-100 Black, 48
    Blue 2384.07 Touring-1000 Blue, 46
    Blue 2384.07 Touring-1000 Blue, 50
    Blue 2384.07 Touring-1000 Blue, 54
    Blue 2384.07 Touring-1000 Blue, 60
    Grey 125.00 Touring-Panniers, Large
    Multi 89.99 Men's Bib-Shorts, L
    Multi 89.99 Men's Bib-Shorts, M
    Multi 89.99 Men's Bib-Shorts, S
    Red 3578.27 Road-150 Red, 44
    Red 3578.27 Road-150 Red, 48
    Red 3578.27 Road-150 Red, 52
    Red 3578.27 Road-150 Red, 56
    Red 3578.27 Road-150 Red, 62
    Silver 3399.99 Mountain-100 Silver, 38
    Silver 3399.99 Mountain-100 Silver, 42
    Silver 3399.99 Mountain-100 Silver, 44
    Silver 3399.99 Mountain-100 Silver, 48
    Silver/Black 80.99 HL Mountain Pedal
    Silver/Black 80.99 HL Road Pedal
    Silver/Black 80.99 Touring Pedal
    White 9.50 Mountain Bike Socks, L
    White 9.50 Mountain Bike Socks, M
    Yellow 2384.07 Touring-1000 Yellow, 46
    Yellow 2384.07 Touring-1000 Yellow, 50
    Yellow 2384.07 Touring-1000 Yellow, 54
    Yellow 2384.07 Touring-1000 Yellow, 60
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Find number and name of sales person

    Hi, 
    I have a table, which lists the number of sales made by sales person for the year 2013. How do I list the number of sales and the name of sales person, whose sales are less than 4 for the year 2013.
    Name
    Gender
    Won Oppty
    Sales ( in Value USD)
    Sold Month and Year
    Year
    KFM WMM
    F
    2
    $1,279,310
    72013
    2013
    FSOR DPK
    M
    2
    $965,445
    92013
    2013
    JCS QJA
    M
    3
    $1,892,919
    52013
    2013
    YQFT NNOPI
    F
    4
    $2,205,713
    102013
    2013
    ZGZRS XSV
    M
    4
    $1,516,615
    52013
    2013
    AQOH KEYOZ
    M
    4
    $1,908,883
    52013
    2013
    DWE XSV
    M
    5
    $1,356,954
    102013
    2013
    YFE JDP
    F
    6
    $2,767,863
    82013
    2013
    KCRXF XSV
    F
    6
    $2,037,738
    42013
    2013
    OVEL LZS
    F
    6
    $2,276,738
    72013
    2013
    The answer I should get is
    2
    KFM WMM
    2
    FSOR DPK
    3
    JCS QJA
    Nirmal

    Hi~
    Formula cannot complete your needs.
    You can use criteria parameters (like "<4" and "=2013") in VBA code:
    Option Explicit
    Sub GetFilteredData()
    With ActiveSheet
    With .UsedRange
    .AutoFilter Field:=3, Criteria1:="<4"
    .AutoFilter Field:=6, Criteria1:="=2013"
    End With
    .Columns(2).Hidden = True
    .Columns("$D:$F").Hidden = True
    End With
    End Sub
    Sub RestoreData()
    With ActiveSheet
    If .AutoFilterMode Then
    .AutoFilterMode = False
    End If
    With .Columns(2)
    If .Hidden Then
    .Hidden = False
    End If
    End With
    With .Columns("$D:$F")
    If .Hidden Then
    .Hidden = False
    End If
    End With
    End With
    End Sub
    In Sheet1, insert two shapes and assign macro names to them, here's the result by clicking GetFilteredData and RestoreData:
    Regards,
    Cristin Yan

  • G/L Account Display with Vendor Number and Name -Urgent-

    Hi Experts!
    Is there a transaction, report, or table that can show a list of all the vendor names/numbers for transactions posted to a specific G/L account for a specified period?  If so, please let me know.  Thank you for your time!
    Best Regards,
    WC

    We can display the Vendor number from the layout in FBL3N report, but the Vendor number will be displayed only if the document is posted from MM module. If the posting is from normal FI, it will not be displayed.
    Other option is to develop a simple ABAP report to display Vendor.
    Thanks
    Murali.

  • To get number and name of groups() existing in AD

    Dear Fouramites,
    I got the program from this forum to retrive the number of users in a group given the name of the group in search filter.
    String searchFilter = "(&(objectClass=group)(CN=pluto*))";
    My requirement is to get the names of all the the groups(aliases) created by admin. Can any one plz help me out in getting this info.
    Thanks & Regards
    Kaavyanjali jena

    use this FM GET_COMPONENT_LIST.
    can get list of fields also from variable which is not defined in DDIC. But has to be global.
    Michal

  • No Default of Personnel Number and Name in Record Working Time

    Hi,
    In Record Working Time, I have done the necessary settings in CAC1 and CAC2. Every filed that I have selected is appearing except PERNR and Employee Name. Not only that, the fileds themselves are not appearing let alone a value for those. Is there something I am missing?

    These fields dont appear in Record working time in ESS till EHP4, From EHP5 these can be seen
    but these fields wont be shown
    SO this is standard

  • Does the iphone itself back up information about phone numbers and names before being saved?

    Here’s one to stretch your brains..
    I was adding a new contact in my Add feild (phone # and name) portion of my iphone 4 but was unable to complete the task. I had added a phone number and name and left this window open for half an hour. When I came back to it I accidentally pushed Cancel (my eyes are bad) I instantly realized y mistake but the name and phone number is gone. Is it possible that it was backed up automatically and I can recover this information?

    No. It was never saved, therefore there was nothing to back up. Not to mention the fact that it didn't get plugged into iTunes inbetween so there would be no place to back up to.

  • I have transferred all my music from iTunes onto my USB to play on my car audio radio. The radio reads the music but does not play it in sequence. There is a specific way to save the music into folders and name them. I have a Pioneer DEH-2350UBSW.

    I have transferred all my music from iTunes onto my USB to play on my car radio. The radio reads the music but does not play it in sequence. So it plays certain folders, then it skips folders. in certain folders it skips tracks. apparently there is a specific way to save the music into folders onto the USB with regard to naming the tracks and folders.. I have a Pioneer DEH-2350UBSW. Can anyone please help.

    It is a stick, Cruzer Blade 16gig.
    In the manual it says the following about the USB storage device:
    1. Playable folder hierarchy is up to 8 tiers
    2. Playable folders up to 500
    3. Playable files up to 15 000
    Under sequence of audio files it says that the user cannot assign folder numbers and specify playback sequences with this unit. It also gives an example of a hierarchy:
    01 - folder
    Under that is 02 which is also a folder
    Under that are compressed audio files 01 to 05: folder number
    Under that there is another folder same concept as above - I have attached that part of the manual in this response.
    I named my folder - Folder 001 Artists name and then in that folder I added the tracks as:
    001 Song title
    002 song title
    It played the 1st song in the folder and skipped to the next folder, I can't even locate the other tracks.
    On another folder I saved 31 songs but only 29 played so I am not sure whether there is a limit.
    All I need is an example of how to number and name everything.

Maybe you are looking for