How do you determine a column's data type?

Let's say I have a DB Table out there and I have NO WAY of knowing that column 1 is a CHAR, column 2 is a SMALLINT or whatever. I can write sql to select * from table and see everything, but how do I know what each column's data type is?

I found it. Thanks, and for any other people who need the solution, here is what I found on another thread:
int type;               try {                    type = i_metaData.getColumnType(column+1);               }               catch (SQLException e) {                    return super.getColumnClass(column);               } switch(type) {               case Types.CHAR:               case Types.VARCHAR:               case Types.LONGVARCHAR:                    return String.class;               case Types.BIT:                    return Boolean.class;               case Types.TINYINT:               case Types.SMALLINT:               case Types.INTEGER:                    return Integer.class;               case Types.BIGINT:                    return Long.class;               case Types.FLOAT:               case Types.DOUBLE:                    return Double.class;               case Types.DATE:                    return java.sql.Date.class;               case Types.TIMESTAMP: //Date Time                    return java.sql.Date.class;               case Types.DECIMAL: // Currency,Decimal                    return Float.class;               default:                    return Object.class;        } }

Similar Messages

  • How can you determine a file creation date and know if it's been altered since the creation date

    I need to know how to determine a file creation date on an ipad.  If someone creates a document/note on an ipad how can you tell when it was created and if it has been altered since?

    Unless you are using a third party app that provides that functionality, in iOS the only thing youcan access is the last edit/save date and time, which is fairly evident in the user interface for documents and notes. Some apps that handle MS Office files may provide that, but ican't say first hand.

  • How do you transform a 2d scaled data type to a waveform data type?

    I'm using a daqcard 6024e with labview 6.1 pds. I'm modifying an example VI called Cont Acq to Spreadsheet File.vi. I wanted to run an fft on the data coming from the AI Read VI but that data is a 2d scaled array. The Array to Spreadsheet String VI which I need requires the output from the AI Read VI to be a 2d scaled array.

    Make a FOR loop with a Get Waveform Components function in there, the "Y" component will be a 1D array. Wire the Waveform array through the FOR loop to the left side of the Get Waveform Components, let it index (it will by default). Wire the 1D array from the Y component out of the FOR loop and let it index also. The result is your 2D array of DBL.
    - Dan

  • How do you create a column of sequenced dates in Numbers

    How do you create a column of sequenced dates in Numbers without typing in each date? For example: 01/05/15, 01/12/15, 01/19/15, 01/26/15, 02/02/15, etc.

    Hi Cha Ling,
    Another way,
    Enter your first two dates that show the desired interval- i.e. 01/05/15 and 01/12/15.
    Select both cells and choose fill from the contextual menu.
    Drag down to fill your column.
    quinn

  • How can we get Dynamic columns and data with RTF Templates in BI Publisher

    How can we get Dynamic columns and data with RTf Templates.
    My requirement is :
    create table xxinv_item_pei_taginfo(item_id number,
    Organization_id number,
    item varchar2(4000),
    record_type varchar2(4000),
    record_value CLOB,
    State varchar2(4000));
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
    select * from xxinv_item_pei_taginfo;
    Item id Org Id Item Record_type Record_value State
    493991     224     1265-D30     USES     fever     TX
    493991     224     1265-D30     HOW TO USE     one tablet daily     TX
    493991     224     1265-D30     SIDE EFFECTS     XYZ     TX
    493991     224     1265-D30     DRUG INTERACTION     ABC     TX
    493991     224     1265-D30     OVERDOSE      Go and see doctor     TX
    493991     224     1265-D30     NOTES     Take after meal     TX
    Above is my data
    I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
    In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
    its a BI Publisher report.
    please suggest

    if you have data in db then you can create xml with needed structure
    and so you can create bip report
    do you have errors or .... ?

  • How do you "Unsort" a column to get it back to the way it was when you opened it?

    How do you "Unsort" a column to get it back to the way it was when you opened it?
    I like to sort by price or alphabetical etc but then I want to return the cells to where they were and I can't figure out a way to do that.
    For instance, the rows that don't matter so much like the ones that just describe what date is the follow are now all together and I want it back the way it was when I opened the document without losing any changes I've met to other things in the doc since I sorted.
    Can anyone help with this?
    Thanks.
    Tim

    Hi fl2,
    Adding to replies from Wayne and Barry. After you open that Numbers document, insert another column into a table before you sort it. The column can be anywhere in that table. Here is Column A (labelled "Original") that I inserted. It has numbers in sequence (1, 2, 3...)
    As Barry said, these must be numbers, not the results of a formula.
    Now you can sort by any column to your heart's delight and always go back to the original order by sorting that table by column A.
    Regards,
    Ian.

  • How can you save an app's data?

    Hi, how can you save an app's data? For example, if I want to switch some applications on my iPod with those were on my iTunes Apps Library, iTunes will force to remove the apps that was on my device and sync the apps that I want onto my iPod. But once the app is removed from my iPod, its data will be erased too, so, for example months later, I want to put them back onto my iPod, I will lose all the apps data and games progress. So, I just want to know the way that people save their apps data.

    Yo can't. apps are locked to the account thatpurchased them and in-app purchases can only be mad with the account that originally purchased the app.
    You will have to recover use of the first account
    How do I change or recover a forgotten Apple ID Password?
    If you've forgotten your Apple ID Password or want to change it, go to My Apple ID and follow the instructions. SeeChanging your Apple ID password if you'd like more information.
    If necessary:
    Forgotten Security Questions/Answers
    You need to contact Apple by:
    1 - Use the Express lane and start here:
    https://expresslane.apple.com
    then click More Products and Services>Apple ID>Other Apple ID Topics>Forgotten Apple ID security questions.
    or
    Apple - Support -form iTunes Store - Contact Us
    2 - Call Apple in your country by getting the number from here:
    http://support.apple.com/kb/HE57
    or           
    Apple ID: Contacting Apple for help with Apple ID account security
    3 - Use your rescue email address if you set one up
    Rescue email address and how to reset Apple ID security questions
    For general  information see:
    Apple ID: All about Apple ID security questions
    If you have not uses any of the $10 you redeemed to the new account, you can likely get that refunded by contacting iTunes
    Contact iTunes

  • How do you determine the optimal size for Mozilla Firefox?

    How do you determine the optimal size for cache in Mozilla
    Firefox? I am using Firefox 7.0.1 on a 64-bit Windows 7 Ultimate operating system with 3GB RAM and 300 GB hard drive, but I have other computers running Windows XP. If the answer doesn't apply to all current versions of Firefox on all supported Windows operating systems, please explain the differences. Is there a formula for calculating the best cache size?

    I found that the best idea is to let Firefox decide that itself.

  • How do you determine the firmware version for a laptop docking station?

    How do you determine the firmware version of a HP docking station?
    Laptop Model: HP 2740p
    OS: 64bit Windows 7
    Expansion Base: 2740 Ultra Slim Expansion Base WA995AA#ABA
    Thank you for any assistance.
    Alvin

    atenpo wrote:
    How do you determine the firmware version of a HP docking station?
    Laptop Model: HP 2740p
    OS: 64bit Windows 7
    Expansion Base: 2740 Ultra Slim Expansion Base WA995AA#ABA
    Thank you for any assistance.
    Alvin
    WA995AA#ABA shows to be a hard drive, not a docking station

  • How do you determine the picture that is shown on iTunes for your podcast?

    How do you determine the picture that is shown on iTunes for your podcast? Is that done in iWeb or Garagetunes?

    That is a supported format,
    Pull the battery while the device is ON, replace after a minute, Let the device reboot 1-3 min,
    see if the problem is fixed,
    If not we may have to reload the device OS to get back the missing option.
    Thanks,
    If you need more info please ask!  If not please resolve the thread using the options by the Kudos’ star, Just place the check in the Post that answered your question, Thanks
    Click Accept as Solution for posts that have solved your issue(s)!
    Be sure to click Like! for those who have helped you.
    Install BlackBerry Protect it's a free application designed to help find your lost BlackBerry smartphone, and keep the information on it secure.

  • How do you determine what shows are in free video on demand?

    How do you determine what to include in the free on-demand shows?  The Mentalist was always there before but is no longer.  This is especially important for shows like the Mentalist and The Good Wife which come on Sunday nights after sports events.  Even if I set my DVR to record 60 minutes over it doesn't always catch the entire episode.  Would also like to see Person of Interest  there.   And last but not least, you should have a way for people to access netflix or other services from your service.  

    If you go to BROWSE then the FREE folder you will find that everything in there is free viewing. If you go elsewhere and try to watch a paid show, you will get a prompt asking you to purchase. It also shows the amount of the movie before purchase.
    Anthony_VZ
    **If someones post has helped you, please acknowledge their assistance by clicking the red thumbs up button to give them Kudos. If you are the original poster and any response gave you your answer, please mark the post that had the answer as the solution**
    Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or plan

  • How do you determine DSP version in an IOS

    How do you determine DSP version in an IOS. I have a bug that says 'Downgrading DSPware to 4.4.12 or earlier resolves the echo issue.'
    The bug ID is CSCsd54344.

    I have a site with CME with similar static issues, they are running 12.3(8r)T7 with CM 3.2. The DSP version is:
    DSP DSP DSPWARE CURR BOOT PAK TX/RX
    TYPE NUM CH CODEC VERSION STATE STATE RST AI VOICEPORT TS ABORT PACK COUNT
    ==== === == ======== ======= ===== ======= === == ========= == ===== ============
    edsp 001 01 g711ulaw 0.1 IDLE 50/0/1.1
    edsp 002 02 g711ulaw 0.1 IDLE 50/0/1.2
    edsp 003 01 g711ulaw 0.1 busy 50/0/2.1
    edsp 004 02 g711ulaw 0.1 IDLE 50/0/2.2
    edsp 005 01 g711ulaw 0.1 IDLE 50/0/3.1
    edsp 006 02 g711ulaw 0.1 IDLE 50/0/3.2
    edsp 007 01 g711ulaw 0.1 IDLE 50/0/4.1
    edsp 008 02 g729r8 p 0.1 IDLE 50/0/4.2
    edsp 009 01 g711ulaw 0.1 IDLE 50/0/5.1
    edsp 010 02 g729r8 p 0.1 IDLE 50/0/5.2
    ---------------------------FLEX VOICE CARD 0 ------------------------------
    *DSP VOICE CHANNELS*
    DSP DSP DSPWARE CURR BOOT PAK TX/RX
    TYPE NUM CH CODEC VERSION STATE STATE RST AI VOICEPORT TS ABRT PACK COUNT
    ===== === == ======== ======= ===== ======= === == ========= == ==== ============
    *DSP SIGNALING CHANNELS*
    DSP DSP DSPWARE CURR BOOT PAK TX/RX
    TYPE NUM CH CODEC VERSION STATE STATE RST AI VOICEPORT TS ABRT PACK COUNT
    ===== === == ======== ======= ===== ======= === == ========= == ==== ============
    C5510 001 01 {flex} 4.4.705 alloc idle 0 0 0/0/0 02 0 47166/0
    C5510 001 02 {flex} 4.4.705 alloc idle 0 0 0/0/1 06 0 11363/0
    C5510 001 03 {flex} 4.4.705 alloc idle 0 0 0/0/2 10 0 1750/0
    C5510 001 04 {flex} 4.4.705 alloc idle 0 0 0/0/3 14 0 557/0
    C5510 001 05 {flex} 4.4.705 alloc idle 0 0 0/1/0 02 0 934/0
    C5510 001 06 {flex} 4.4.705 alloc idle 0 0 0/1/1 06 0 731/0
    C5510 001 07 {flex} 4.4.705 alloc idle 0 0 0/1/2 10 0 4837/0
    C5510 001 08 {flex} 4.4.705 alloc idle 0 0 0/1/3 14 0 21514/0
    ------------------------END OF FLEX VOICE CARD 0 ----------------------------
    Hmm, whay does it show 0.1 next to the edsp?
    Chris

  • How do you use a column title Ina formula in numbers

    How do you use a column title in a formula in numbers ie. "cost" vs. F-1?

    Have you tried here?   This isn't specifically a "Using iPad" question.

  • How do you Determine the Largest Size/Fastest Speed Hard Drive

    In general, how do you determine the maximum hard drive size/speed you can upgrade to?

    As long as the drive your are considering physically fits as already stated there is no maximum size you can install. Please complete your profile so we know what machine you have.
    If your machine is covered by a warranty or AppleCare I would recommend against installing another HD as this may invalidate the warranty. I would recommend in that case using a Firewire 800 external HD instead.
    Regards,
    Roger

  • How do you determine resolution for a given print size in LR?

    CS3 displays image resolution for a given size. How do you determine what that resolution is in LR for a given print size, so you know whether you should upsize or downsize for optimum print resolution range?

    The only way I know of is to work it out. LR and PS make assumptions that are often not ideal (although the differences may not be noticable). Different printers like different resolutions per inch. For example, I once had an Olympus Dye Sub printer that produced awful prints unless the file was exactly 314 ppi. Not 300, 314. 300ppi looked awful. 314 looked amazing. Many Canon inkjets prefer 300ppi files and most of the better Epson's prefer 360ppi. Lambda printer like 400ppi files.
    So find out what the printer likes, and in LR enter that number into the printer dialog. I believe the LR engine interpolates the file based on this and the image size on paper you choose to produce a file of the best size.
    Having said all that with most modern domestic and prosumer inkjets the difference is pretty negligable.
    Gordon

Maybe you are looking for

  • Unsupported or Damaged SWF

    Hi, The other topics about this seemed to be different to my own problem, so I think I need to start a new topic. For my After Effects project (CS4) I use SWF files instead of image sequences or MOV files etc. Leading up until now, I've had few probl

  • How to export 1080 HD video to MPG4 file with chapters?

    Now that I have put a sequence together in FCE, how do I create a 1080HD MPG4 file that can be used on a PC, MAC or with the WD HD Media player (for those that know the latter). Thanks!

  • White images on steam problem

    Hi, I install Arch linux with openbox, nouveau(I have nvidia gforce mx 4000, I can't install nividia's legacy driver 96xx because I don't know how downgrade Xorg server) and steam, when I start steam from xTerm and I get this: >>moderator edit: Remov

  • XL Reporter Run-time Error '429' ActiveX component can't create object

    Hi Everyone, When trying to install XL Reporter on a Windows 2003 Server SP2 machine getting the following Error: XL Reporter Run-time error '429': ActiveX component can't create object. Did anyone get this error? Please advise of any steps we can tr

  • Upgrading from cs2

    purchased a secondhand copy of cs2. can i purchase an upgrade to 5.5?