Forum Replies Created

Viewing 15 posts - 586 through 600 (of 698 total)

  • RE: Update a table from another impoting modified and new records

    j.grimanis (8/28/2009)


    Hi all,

    I want to update a table A from another one B, impoting modified and new records from A and simultaneously keep the unmodified old records from B.

    The Tsql...

  • RE: Copy data to different server

    Good stuff, glad it worked for you!

  • RE: Copy data to different server

    When you're dealing with linked servers, I'd suggest you use this approach:

    SELECT T1.Col1, T1.Col2, T1.Col3, T2.Col1, T2.Col2

    FROM Server.Database.Schema.Table T1

    JOIN Server.Database.Schema.Table T2 ON T1.Col1 = T2.Col1

    So, for your query, it would...

  • RE: How to find what to join on. Basic question...

    Sometimes it's set up in a way that you really wouldn't be able to decipher on your own. If there's no database diagrams or comments anywhere, it can get pretty...

  • RE: mssql trigger needed

    It is oracle, he's put that in the topic description. And yeah - do the work yourself, then post here if you can't get it to work 😛

  • RE: Insertion

    SSIS is very good at handling insertions of large amounts of data. You should definitely consider it.

  • RE: Generating Username

    Alright - depending upon how big your table currently is, and what kind of system resources you have to make use of, you might want to consider using SSIS to...

  • RE: Generating Username

    Okay, sure, makes sense. So you're saying that your function is going to return the correct login name based on some parameters, but your function is going to take a...

  • RE: Generating Username

    Well, that makes a pretty big difference! If email addresses are unique, and you used the email address to generate the login name, then how can you ever run into...

  • RE: skip rows from result set

    You could use DATEDIFF and the Modulus operator.

    Something like, DATEDIFF(ww, CurrentDate, StartDate) % SkipWeek

    So, if you wanted to get the data every 3 weeks, what you would have is

    DATEDIFF(ww, CurrentDate,...

  • RE: Generating Username

    Oops - had a syntax error in my last post, forgot the END for the CASE statement.

    Anyway- something like this?

    WITH cte AS

    (SELECT ID, firstname, lastname, email, ROW_NUMBER() over (PARTITION BY...

  • RE: Many to Many query

    Should post create table and insert data statements with your questions, though I guess in this case it's not really too necessary. Anyway, try this:

    WITH CTE AS

    (

    SELECT Lic_ID, SerialNum, P_ID,...

  • RE: Generating Username

    Well, I'm not sure what the specification for your login names is, but if it were something like, say, take the email and make it a login name, then in...

  • RE: Copy data to different server

    Well, I'm still not completely up to speed on SSIS, but from what my coworker told me, SSIS can't be used for scheduled tasks unless you have the Developer or...

  • RE: Copy data to different server

    Alright - well, is EmployID an Identity field? And, if so, do both tables share identical records for that?

    If so, you can use the MAX(EmployID) approach to find out which...

Viewing 15 posts - 586 through 600 (of 698 total)