Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6555825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:52:03+00:00 2026-05-25T12:52:03+00:00

I have the following UPDATE query: UPDATE A SET A.EARLY_SHIFT = (SELECT DATEPART(hour, S.SCHED_START

  • 0

I have the following UPDATE query:

    UPDATE    A
    SET       A.EARLY_SHIFT =
        (SELECT     DATEPART(hour, S.SCHED_START - A.FIRST_LOGIN) * 3600 
                  + DATEPART(minute, S.SCHED_START - A.FIRST_LOGIN) * 60 
                  + DATEPART(second, S.SCHED_START - A.FIRST_LOGIN) AS Expr1)
         FROM   DLY_AGT_ACTIVITY AS A
         INNER JOIN  DLY_AGT_SCHEDULES AS S
              ON A.DATE = S.DATE AND RIGHT(A.ID, 5) = RIGHT(S._ID, 5)

This in Management studio runs perfectly. However, in my sql task of my SSIS package, it adds a CROSS JOIN like so:

UPDATE A
    SET A.EARLY_SHIFT =
      (SELECT  DATEPART(hour, S.SCHED_START - A.FIRST_LOGIN) * 3600 
             + DATEPART(minute, S.SCHED_START - A.FIRST_LOGIN) * 60 
             + DATEPART(second, S.SCHED_START - A.FIRST_LOGIN) AS Expr1)
        FROM DLY_AGT_ACTIVITY AS A 
         INNER JOIN DLY_AGT_SCHEDULES AS S 
             ON A.DATE = S.DATE AND RIGHT(A.ID, 5) = RIGHT(S._ID, 5) CROSS JOIN A

And this makes the query fail in my sql task. What the heck is going on?

*I have tried running without any aliases, and this did not help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:52:03+00:00Added an answer on May 25, 2026 at 12:52 pm

    I have restructured your update query, but it should give the same result.

    UPDATE DLY_AGT_ACTIVITY
    SET EARLY_SHIFT = DATEPART(hour, S.SCHED_START - FIRST_LOGIN) * 3600 
        + DATEPART(minute, S.SCHED_START - FIRST_LOGIN)                                                
        * 60 + DATEPART(second, S.SCHED_START - FIRST_LOGIN) 
    FROM         DLY_AGT_SCHEDULES AS S 
    WHERE   DLY_AGT_ACTIVITY.[DATE] = S.DATE 
    AND     RIGHT(ID, 5) = RIGHT(S._ID, 5)
    

    Can you try this in your package and let me know if it resolves the SSIS issue?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following query: UPDATE PRODUCT SET FIXEDCOST = (Select PRICE from PRODUCTPROGRAM
I have following SQL UPDATE query: UPDATE Invoices SET Price = (SELECT SUM(Price*ProductsAndServices.Amount) FROM
Assume I have the following query: Update LPMBonusReport Set BoxID = (Select ContainerSerialNumber From
I have an SQL query that takes the following form: UPDATE foo SET flag=true
I have to execute the following query in Android SQLite UPDATE player SET rank=rank+1
I have the following sql query: UPDATE (SELECT * FROM table_A INNER JOIN table_B
I have the following query: $sql=UPDATE streams SET name='$name', limit='$limit', desc='$desc' WHERE id='$id'; when
I have an update query like following: update table TABLE1 set COL1 = 'X'
Imagine the following sql query: UPDATE MYTABLE SET COL2 = (SELECT COL2 + 1
I have the following UPDATE scenario: UPDATE destTable d SET d.test_count = ( SELECT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.