Is there a way to dynamically figure out the FIRSTROW & LASTROW using Bulk Insert?

I noticed most of my files follow a certain convention, so I can use Bulk Insert with this:
FIRSTROW = 2, LASTROW = 224
However a few files have many more records.  I'd like SQL Server to dynamically figure out the first and last rows with data, but I don't know if that's possible.  Can someone confirm?
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

Nope, you would need read the files from some program. Could be a CLR stored procedure if you want to do it from SQL Server. But from BULK INSERT alone, no.
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • Is there a way to programmatically figure out what toolkits are used by my project and if they are installed on my PC?

    I have a big Project and I would like to run a VI that would check the required toolkits for my application and also check if those toolkits are indeed installed on my PC.
    Thanks for your help

    When your Project is open, you can see some of the Dependencies, other VIs associated with the VIs listed in your Project.  This can include VIs that are in the Physical folder containing the Project but not in a Project Virtual folder, VIs in libraries, including .llbs, vi.lib, and user.lib, .dll files (from NI and others) referenced by items in the Project, and possibly other things.  These are items that it finds on your current machine, and that you would need if you moved your code to another computer.
    When you load one of the VIs in your Project into memory, it will do a further search to locate all of the functions that it uses, raising an Error condition if one is not found (sometimes due to a missing Driver, for example).  A trick that I like to use during Development is to create a "Tree" VI that contains a copy of every VI in my Project.  If I open the Tree, and any VI makes a call on a "missing function", I will have a Broken Arrow, and can use the Error reporting to find the Missing Link.
    Bob Schor

  • Is there any way I can find out the service record on this mac ?

    I purchased a used QS from an authorized apple dealer at their after boxing day sales event. This QS is extremely quite compared to my polar express MDD.
    Is there any way I can find out the service record on this mac ?
    Somewhere away back when I heard that by knowing the serial number the details of the service record on the given mac could be found. However in those days I only bought new. These days with mac's inability to run applications that require the for real OS 9 ( not classic ) I have to scour the used market. I have some high end audio midi programmes ( for example emagic, cubase VST score ) that do the job and sometimes better then then the OS X versions.

    Hello,
    You can use System.getProperty("SAPSYSTEMNAME"); in your UDF as specified in this thread.
    Get name of XI System in mapping
    Hope this helps,
    Mark
    Edited by: Mark Dihiansan on Apr 27, 2011 7:51 AM

  • I have scratched off some of the numbers on my itunes card!  Is there a way I can find out the numbers please?

    I have scratched off part of my itunes code, is there another way I can redeem the code?

    This forum is for questions about iTunes U, Apple's service for colleges and universities to post educational material in the iTunes Store. You'll be most likely to get help with this issue if you ask in the general iTunes forums.
    When you repost, please only ask your question once. There's no need to repeat it over and over.
    Regards.

  • Is there a way to list all of the active images using Dreamweaver?

    Is there a way to LIST OUT all of the active images that are currently being used on a page in Dreamweaver?  Or do I have to click each one and write down the image name by hand?
    Thanks!
    LJ

    Here are 2 ways to "start over":
    1. remove all photos (or all extraneous photos anyway) from existing catalog (e.g. all photos collection, ctrl/cmd-a, then delete key).
    2. create a new catalog (see file menu).
    It sounds like #2 would be best for you, so you don't have extraneous keywords in your catalog etc.
    ~R.

  • Is there a way i can figure out where i purchased a Handycam about 3 or 4 years ago?

    I had a Sony HDR-CX160/LI that was recently stollen.  I am thinking i purchased it 3 or 4 years ago and i need to find out how much they cost at that point in order to let insurance know, as i no longer have a receipt.  I have all the original packing with the Barcode.  

    Hi, passowoffice.Have you got it solved? I think they can check the information by reading barcodes you have. Good luck.    Best regards,Arron

  • In the "Help" pull-down, is there a way to disable (gray out) the "Restart with Add-ons Disabled" so that a security extension can not be bypassed?

    The extension that I am using is "Public Fox" 1.09.

    Note that you would only have to hold down the Shift key while starting Firefox to start in Safe Mode.
    Any restriction added via an extension can easily be bypassed by knowledgeable users.
    See also:
    *http://mike.kaply.com/2012/04/10/customizing-firefox-disabling-safe-mode/
    *http://mike.kaply.com/2013/01/11/disabling-safe-mode-in-firefox-17/

  • Can't figure out the AC to use for my "Previous" and "Next" buttons

    Hi guys,
    I have a slidshow that stretches over 280 frames which can be
    seen here:
    http://www.paragon-nj.com/newslideshow.html
    or the fla:
    http://www.paragon-nj.com/newslideshow.fla
    There are fade ins and outs and I made buttons numbered 1-5
    where you can skip to each new slide. At present I am trying to
    create the "previous" and "next" buttons but I'm hitting a snag of
    how you make something like this work. The entire AC I have is
    this:
    a.onRelease=function(){
    gotoAndPlay(1);
    b.onRelease=function(){
    gotoAndPlay(55);
    c.onRelease=function(){
    gotoAndPlay(110);
    d.onRelease=function(){
    gotoAndPlay(165);
    e.onRelease=function(){
    gotoAndPlay(220);
    next_btn.onRelease = function () {
    (not sure what to put here) ;
    previous_btn.onRelease = function () {
    (not sure what to put here) ;
    Thanks in advance for all the input
    Wil

    use the _currentframe+55 for your next button and
    _currentframe-55 for your previous button unless the current frame
    is 1 or 55 when you were inconsistant used 54 frames between slide
    transitions.

  • I figured out the terms of use problem

    At least for me.  I manually installed the latest version of I tunes and it corrected the problem.

    Flash projects typically use an audio sample rate of 22,050Hz.  Your audio device sample rate is reset by Flash and is (likely) not informing Audition (by way of the ASIO driver, or within the wrapper) of the change.  Audition is still pushing 44,100 samples for each second of audio, but your device is only playing back 22,050 of those per second giving you the half-speed effect.
    I don't recall what audio device you were using, though I know you mentioned it in another thread.  The best solution for this issue would be to find an ASIO driver for your device, if one exists.  If not, you can try using the ASIO4ALL driver, from www.asio4all.com which acts as a go-between for ASIO programs and WDM-devices.  This driver might better recognize changes in hardware settings that don't get reported by the Windows audio driver.

  • Is there a way to block Spec Types the ability to use Global Succession?

    want to block certain specs type from being globally succeeded.
    thanks,
    David

    This isn't fully supported because your changes will be lost when you upgrade etc.   But you can control which options are available in global succession by editing the web.config file in your Reg app.   You can remove the spec type specific <SuccessionSpecType>  nodes inside <SpecTypeMappings>.
    For example, to turn off Material Specs remove the <SuccessionSpecType type="1004" ...> block
    Hope this helps,
    Kelly

  • Table to find out the function modules used in a particular program

    Hi,
    Is there any standard table to find out the function modules used in a particular program?
    Such as there is a table D010TAB to find out the tables used in a program .

    Hello
    There is no exist such table.
    But try this snippet:
    REPORT ZSEARCH.
    PARAMETERS: P_NAME LIKE D010SINF-PROG.
    DATA: PROGTXT(72) TYPE C OCCURS 0 WITH HEADER LINE.
    DATA: TMP(72) TYPE C OCCURS 0 WITH HEADER LINE.
    DATA: FUNCT TYPE RS38L_FNAM OCCURS 0 WITH HEADER LINE.
    DATA: INCL TYPE RSEUINC OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'RS_GET_ALL_INCLUDES'
         EXPORTING PROGRAM    = P_NAME
         TABLES    INCLUDETAB = INCL.
    LOOP AT INCL.
      READ REPORT INCL-MASTER INTO TMP.
      APPEND LINES OF TMP TO PROGTXT.
      REFRESH TMP.
    ENDLOOP.
    READ REPORT P_NAME INTO TMP.
    APPEND LINES OF TMP TO PROGTXT.
    LOOP AT PROGTXT.
      IF PROGTXT CS 'CALL FUNCTION'.
        SEARCH PROGTXT FOR ''''.
        IF SY-SUBRC = 0.
          DO.
            SHIFT PROGTXT LEFT BY 1 PLACES.
            IF PROGTXT(1) = ''''.
              SHIFT PROGTXT LEFT BY 1 PLACES.
              DO.
                SHIFT PROGTXT RIGHT BY 1 PLACES.
                IF PROGTXT+71(1) = ''''.
                  SHIFT PROGTXT RIGHT BY 1 PLACES.
                  CONDENSE PROGTXT.
                  FUNCT = PROGTXT. COLLECT FUNCT. EXIT.
                ENDIF.
              ENDDO.
              EXIT.
            ENDIF.
          ENDDO.
        ENDIF.
      ENDIF.
    ENDLOOP.
    SORT FUNCT.
    LOOP AT FUNCT.
      WRITE: FUNCT. NEW-LINE.
    ENDLOOP.

  • Is there a way to figure out the name behind an Apple ID?

    Is there a way to figure out the name behind an Apple ID?  My oganization uses an iPad as a kiosk.  Somone accessed the iPad, changed the Apple ID associated with iTunes, downloaded a game and set a password to lock up the whole iPad.  We had to completely restore the iPad in order to access it.  When I tried to upload a new app, a different Apple ID popped up, and I'm assuming it was the person who locked the iPad and downloaded the game.  I would like to figure out who owns that account, just so we can not allow that person access to the iPads anymore.
    Is there a way to do this?

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico, Spanish is my native tongue. I do not speak English very well, however, I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    Perhaps with a court order because the person committed a criminal act. Otherwise it is doubtful that Apple would violate the privacy of a client/account holder just on your word.

  • Is there a way to dynamically determine the number of out parameters for a server side procedure?

    Hi,
    Below is a helper method used for calling a server-side function which loops through the inbound bindVars parameter to populate the function's IN parameters. Is there a way to dynamically determine the IN/OUT parameters based on the procedure name in the stmt parameter? No members of the CallableStatement class seemed promising, but the getParameterMetaData() method in the PreparedStatement class seemed like it could be helpful lead. However, I have not found any detailed descriptions (yet) of how to use it.
    protected Object callStoredFunction(int sqlReturnType, String stmt,
      Object[] bindVars) {
      CallableStatement st = null;
      try {
      // 1. Create a JDBC CallabledStatement 
      st = getDBTransaction().createCallableStatement(
      "begin ? := "+stmt+";end;",0);
      // 2. Register the first bind variable for the return value
      st.registerOutParameter(1, sqlReturnType);
      if (bindVars != null) {
      // 3. Loop over values for the bind variables passed in, if any
      for (int z = 0; z < bindVars.length; z++) {
      // 4. Set the value of user-supplied bind vars in the stmt
      st.setObject(z + 2, bindVars[z]);
      // 5. Set the value of user-supplied bind vars in the stmt
      st.executeUpdate();
      // 6. Return the value of the first bind variable
      return st.getObject(1);
      catch (SQLException e) {
      throw new JboException(e);
      finally {
      if (st != null) {
      try {
      // 7. Close the statement
      st.close();
      catch (SQLException e) {}
    James

    The PreparedStatement.getParameterMetaData() object is exactly what you need for this task.
    Once you have the ParameterMetaData you can ask it how many parameters are present and which mode they are. The parameters are numbered from 1 to n and you can use ParameterMetaData.getParameterMode(1); to get the mode of the 1st parameter. The modes are defined as static values in the ParameterMetaData object. Check out the doc at http://docs.oracle.com/javase/7/docs/api/java/sql/ParameterMetaData.html
    Timo

  • TS2446 I can not purchase on ITunes for the first time because I forgot the answer to my security questions, is there a way I can log into my account and figure out the awensers to the questions?

    I can not purchase on ITunes for the first time because I forgot the answer to my security questions, is there a way I can log into my account and figure out the awensers to the questions?

    Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities

  • I need help figuring out the best way to convert analogue video to DV so that I can edit it.

    I have a large number of VHS and hi8 tapes that I want to convert to high quality DV.
    I have a couple of options. One is an Elgado Video capture system.
    The other is a Sony Digital Media Converter Box (DVMC-DA2).
    I have tried a few of the less important tapes using the Elgado Video Capture system. It only allows you to convert to MPEG4 or H.268. It is not very good quality, especially for archival items or items I would later wish to edit.
    I also have the Sony Digital Media Converter Box. I have heard that this is a superior option. So far, though, I have only been able to figure out how to import using an old version of iMovie HD. This makes a large imovie project file (approximately 6.18GB for a 28:30 clip vs a 348.9MB for an MPEG4 using delgado.
    On top of that to convert the file from an iMovieProject file to DV is an additional step that so far looks like will take a half an hour at best.
    Is there any way for me to import VHS/hi8 tapes using the Digital Media Converter Box to creat high quality DV files directly? If so, where can I find this info? What steps should I take and what are the settings I should use.
    I have a lot of tapes so I want to figure out the right and most efficient way to do this because I will be repeating it a bunch of times and would hate to have to start over again.
    I should also mention that I am using a Mid 2010 MacBook Pro, with OSX 10.9.1
    I'm sorry in advance if this seems like an obvious question, but I have been googling and looking at tutorials on the site and just have not found the answer. There are a lot of ads for expensive low quality services to do this converting for you, so maybe the answer I am looking for is burried in all that advertising.
    Thanks

    Thanks Biggles and Gotz. I just couldint find capture, but now I can! (It was right under my nose too).
    I'm trying it now and it appears to be working. Do you have any other recommendations for capturing from hi8 video source as far as setting go? I am using DV to capture. Are there any other settings I should pay attention to?
    There is an extra line of video noise at the bottom, but when I google it, it sounds like it won't show on most standard tvs and if I want to fix it for online, that I should mask it after the fact vs scaling up the video.

Maybe you are looking for

  • I'm sure hoping someone out there has an answer...

    I have put 4 video clips onto iphone...itunes holds more than 4 clips but it is 'filled up' with 4 and won't move onto loading number 5 video clip into iphone...????

  • Issue in ALV Grid Grand Totals

    Hi Friends,    Hwo can i display  grand total text in ALV Grid? Eventhough i am using Totals_text parameter in layout i am unable to display.  any one vcan help me out in this refgard. if pos send the code Regards, Vijay

  • Tooltip text/mouseover

    I have a table which returns one column - tooltip text for any given primary key. The user would like to have a .png image of a question mark and when the user "mouses over"/"hovers" over the "?", the tooltip text would appear, but they don't want th

  • When encrypting a SOAP, does the AES key embedded in SOAP header?

    I'm using Axis2 and Rampart to encrypt SOAP messages. I'm trying to understand the structure of encrypted SOAP message. My current understanding is, the soap body is encrypted using AES-128, and the AES key is encrypted and embedded in the soap heade

  • Already Posted but Need some info

    A select query was working well for the last 2 months but now hits 100% CPU. It retrieve from some of the tables where large number of inserts or update happens everyday. For time being it was ok but now started.I have requested for statspack report