SSIS ADVICE

  • I want to keep one column as a identity column. but i want to use identity column like this "yyyymmdd hh:nn:ss.mi+1",(Autogenerate). Please guide me how i can accomplish this issue in SSIS. THANKS .

  • Not sure what you're getting at mate - do you mean that you want the process to add a datestamp as the records are entered, if so from when te record's inserted into staging, transform or into the fact/dimension, or does it come from the source?

    I'm a DBA.
    I'm not paid to solve problems. I'm paid to prevent them.

  • Wut? You want to autogenerate... a timestamp column?

    Are you PURPOSELY coding to obfuscate data? What the heck?

    If you need a larger identity column, go to bigint.

    If you're trying to add milliseconds, you need to look at dateadd, not addition. +1 is by day, I believe a millisecond is around .000000000000378, give or take 2 or 3 zeros.

    In either case, I recommend utterly and completely abandoning this attempt unless you have some very specific reasons you need to do this, like you're generating test data or something to try to create a test system. In which case, I'd do it with T-SQL, not SSIS.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • First of all i really appreciate your reply. I am using SSIS to finish this project, and i am using EXCEL SOURCE file and OLE DB source. i want one field called "LINEID" datatype varchar(30) not null, as a auto generate, it should be like this "yyyymmddhhnnssmi+1". My question is how i can accomplish in SSIS or SSMS. It would be awesome if any 1 provide sample code for me. I know i can use "Derived Column". any help?

  • You have pretty much just repeated your initial post without providing the information requested by the respondents. Why should others make the effort to help you if you cannot be bothered to do this?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • rocky_498 (10/29/2010)


    First of all i really appreciate your reply. I am using SSIS to finish this project, and i am using EXCEL SOURCE file and OLE DB source. i want one field called "LINEID" datatype varchar(30) not null, as a auto generate, it should be like this "yyyymmddhhnnssmi+1". My question is how i can accomplish in SSIS or SSMS. It would be awesome if any 1 provide sample code for me. I know i can use "Derived Column". any help?

    Well - I have not the *faintest* idea whatsoever why you want a date value as a VARCHAR. That is not so much a code smell as a code stink IMHO. Personally I would never do that. If you're going to be searching data using date values you're effectively hosed - table scan every time or a load of mad gymnastics to try and sort things out.

    If you're loading a datawarehouse, and you have a date/time in the fact, you *should* be using date and time dimensions linked to the fact, possibly a combination DateTimeDim depending on your requirements as well.

    I'm sorry to be so blunt, but from what little information you've provided, what you are trying to do makes no sense to me at all. Now, I may be wrong, but if you really want valuable assistance you have to provide a much better and more in depth explanation as to what it is you're actually trying to achieve. You have provided nothing of substance in your post so far which would allow us to assist you I'm afraid.

    Give us more to go on - a proper explanation of your requirements, and you'll have great people on here falling over to help. With what you've provided, unfortunately, you're right at the back of the queue compared to people who have provided enough information to provide a basis for assisting. Unfortunately, none of us on here are psychic (as far as I know).

    Have a look around for some other posts which might be like yours which have been sorted and see how they provide their information, or some of the articles on how to post questions

    hth

    Andrew

    I'm a DBA.
    I'm not paid to solve problems. I'm paid to prevent them.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply