Find the missing date from output data

Hi Guys,
For Ex,
I have the following ouput rows with column like
Id   Name   Mobile    Signindate
1     AAA      XXX        2012-03-01
2     AAA      XXX        2012-03-02
3     AAA      XXX        2012-03-05
4     AAA      XXX        2012-03-06
5     AAA      XXX        2012-03-07
the above rows will get based on startdate and enddate parameter like (mar 1,2012 ) to (mar 31,2012)
the Actual output needed is the missing date of Signin ,here in above ex ,it will be march 3 ,march4
Final Output is,
Id   Name   Mobile    Signindate-Missed date
1     AAA      XXX        2012-03-03
2     AAA      XXX        2012-03-04
how to do in tsql
any help is needed 
Thanks
r.b

final output getting like this,
d ResourceID
ResourceName ReportsTo
Location eMail
Mobile Workdate
2013-12-01 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-07 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-08 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-11 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-12 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-13 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-14 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-15 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-16 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-17 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-18 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-19 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-20 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-21 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-22 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-25 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-26 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-27 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-28 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-29 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-30 NULL
NULL NULL
NULL NULL
NULL NULL
2013-12-31 NULL
NULL NULL
NULL NULL
NULL NULL
SELECT d.* ,a.*
FROM   @Dates d
left join #tmp a on d.d =a.Workdate 
WHERE  d NOT in (SELECT Workdate
                 FROM   #tmp) 
suggestions needed, all fields coming as null except workdate ,workdate is the missing date 
tnkx
r.b

Similar Messages

  • Finding the missing number from the table

    I have vendor table with the following column, refvendor_id, the refvendor_id is a primary key in the table. the customer use the application to enter information to the vendor table using an interface
    created in Java. my question is how can I query the refvendor_id numbers that have been skipped by the customer when they enter information to the vendor table.
    refvendor_id is a varchar data type.
    for example
    refvenodr_id
    1
    2
    3
    5
    6
    9
    I would like to capture in my sql the refvendor_id that is skipped here.
    4,7,8
    select refvendor_id
    from  vendor

    I suggest to find the number values with a regular expression.
    Here is a modified version, that will only use the pure number refvendor_ids
    -- Test-Data:
    with vendor as
    select '1' refvendor_id from dual union all
    select '2' refvendor_id from dual union all
    select '3' refvendor_id from dual union all
    select '5' refvendor_id from dual union all
    select '6' refvendor_id from dual union all
    select '9' refvendor_id from dual union all
    select '10'  refvendor_id from dual union all
    select '12'  refvendor_id  from dual union all
    select 'A'  refvendor_id from dual
    -- Query:
    select rownum from dual connect by rownum <= (select max(to_number(refvendor_id)) from vendor where regexp_like(refvendor_id,'^[0-9]+$') )
    minus
    select to_number(refvendor_id) from vendor where regexp_like(refvendor_id,'^[0-9]+$')
    order by 1;(I produce output in number-format, because i want numeric ordering in output)
    Edited by: hm on 14.12.2010 13:32 :
    Of cause you can also use your restrictions, but I can't see if that are really only numbers:
    select rownum from dual connect by rownum <= (select max(to_number(refvendor_id)) from vendor where SUBSTR (refvendor_id, 1, 1) IN ('1', '2', '3', '4', '5', '6', '7', '8', '9') AND LENGTH (refvendor_id) < 5 )
    minus
    select to_number(refvendor_id) from vendor where SUBSTR (refvendor_id, 1, 1) IN ('1', '2', '3', '4', '5', '6', '7', '8', '9') AND LENGTH (refvendor_id) < 5 )
    order by 1;

  • Is there a way to automatically add text to video; the text gleaned from order data?

    is there a way to automatically add text to video; the text gleaned from order data?

    What is "order data"?

  • Lock NOT set for: Archiving the data from a data target

    Dear Expert,
    I try to archive one of my info cube, when i start to write the Archive file the Free Space in the Archive folder not enough and it make the process error.
    Then i try to changes the Archive folder to another path with enough free space. But when i start to write the archive file with new variant this error message came up :
    ==============================================================
    An archiving run locks InfoProvider ZICCPS810 (archivation object BWCZICCP~0)
    Lock NOT set for: Archiving the data from a data target             
    InfoProvider ZICCPS810 could not be locked for an archiving session 
    Job cancelled after system exception ERROR_MESSAGE                  
    ==============================================================
    Please Help Me.
    Wawan S

    Hi Wawan,
    If the earlier archive session resulted in error, please try to invalidate the earlier session in archive management and try running archive job again.
    Hope this helps,
    Naveen

  • Why wont the music transfer from my data CDs/WinMedPlr ? I'm sposed 2 b syncn. 568 songs 2 my nano but only 161 are syncn.  HELP

    I'm tryn 2 sync 568 trax 2 my nano.  big chunk of that came from data CDs . my itunes music library accepted the songs.  Now I c about 400  ! on the left.           please help

    why do all the songs "imported"  from my data CDs  have exclamation points next to them in the itunes library?      they aren't transferring to my nano

  • What is the purpose  of Date From and Date To In Oracle HRMS ?

    hi
    I have doubt on
    What is the purpose of Date From and Date To In Oracle HRMS?
    Thanks

    Where do you see these fields? Please give full details (eg, the navigation path).
    If you're referring to Effective Start Date and Effective End Date (effective_start_date, effective_end_date) these are two fields that appear on many HRMS entities. They're used to store dated history over time. For example:
    14-Jan-2009 to 19-Apr-2009 - Pam Stephens
    20-Apr-2009 to date - Pam Erickson
    In this example Pam got married on the 20th April 2009 and changed her surname from Stephens to Erickson. Here the history of changes are kept so that if we date-track to any time prior to the 20th April 2009 we'll see Pam Stephens and if we date-track on or after the 20th April 2009 we'll see Pam Erickson.
    Check out the following Oracle Support article for more information:
    How Date Track Works [ID 177733.1]

  • Find the 'DAY' for a given 'DATE'

    Hi Folks,
    I need a help regarding finding the day for a given date.
    My requirement is that..,
             If I enter a date using 'parameters', it should write the 'day' for the corresponding date.
    To be more specific.....,
    if I enter date as ' 07/15/2008 ' it should return me  the day as 'Tuesday'.
    Regards,
    Naveen G

    HI,
    FM LIST WITH RESPECT TO DAY, WEEK, AND MONTH.
    CALCULATE_DATE : Calculates the future date based on the input .
    DATE_TO_DAY : Returns the Day for the entered date.
    DATE_COMPUTE_DAY : Returns weekday for a date
    DATE_GET_WEEK : Returns week for a date
    RP_CALC_DATE_IN_INTERVAL : Add days / months to a date
    MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
    END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
    HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
    FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
    MONTH_NAMES_GET : Get the names of the month
    WEEK_GET_FIRST_DAY : Get the first day of the week
    HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format
    SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours
    L_MC_TIME_DIFFERENCE : Find the time difference between two date/time
    HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
    LAST_DAY_OF_MONTHS : Returns the last day of the month
    DATE_CHECK_PLAUSIBILITY :Check for the invalid date.
    Reward points if useful,
    siri

  • Subtraction of 0Base_line date from 0Clearing date in the Query designer

    Hi
    How to subtract  0Base_line date from 0Clearing date  in query designer??
    I tried using 'Selection' by taking both 0Base_line and 0Clearing date separately in different selection and then subtracting them using formulas. But when i run the query,it is giving error "Use keyfigures in the selection".
    Pls suggest. Itz very urgent.
    Regards
    Deepak.

    Hi
    Thanks for your prompt reply.
    But if any of the date is 'blank' then while subtracting 0Base_line date  from 0Clearing date it is giving some value (like 78,90345).Actually i want *'No of days'* to be displayed.
    Date format is dd/mm/yyyy (12/6/2007)
    Pls help.
    Also i want Grading to be assigned in alphabets(as A, B and C) instead of numbers (1 ,2 and 3). Is there any way in Query designer to achieve such type of grading?
    Pls suggest
    regards
    Deepak

  • How can I see website data from itouch 4th generation?  My 8 yr old may have been on inappropriate sites and I need to see the data from website data stored on the itouch.

    How can I see website data from itouch 4th generation?  My 8 yr old may have been on inappropriate sites and I need to see the data from website data stored on the itouch.

    There is no way to see where he has been.
    Go into Settings > General > Restrictions > Safari and turn it off. Then add the MacGruff browser from the app store. After that go back to Restrictions and turn off the ability to add apps.

  • How to view "date from" and "date to"

    Hi,
    I have loaded EMP data. In the mapping "date from" and "date to" are visible. But these fields are not seen when I display the EMP data.Can someone please tell me how to view these fields?
    Thanks,
    Williams

    I got your question . Please find my understandings .
    In the transformation Please check weather routine or formula is written which is stopping the dats
    to be updated to the target .
    I mean data is there in the source but if its not updating to target it seems some rules have been set up in the transformation . Please check .
    Assign marks is the best way to appreciate help

  • How to find the costliest course from the below table.

    dear experts,
    please help me to find the costliest course from the below data
    COURSE         CCOST
    pgdca           4500
    dca             7200
    mca            22000
    dcp             5000
    pgdca           4500
    dap             6200
    dcap            5200
    hdcp           14000
    pgdca           4500
    dca&p          11000

    Then read the FAQ for how to post a question on the forum.
    1. You didn't say anything about using an Oracle database or what your 4 digit version of Oracle is.
    2. You didn't provide a table name, the table DDL or insert statements to create the table and data
    3. You didn't post the queries that you tried to write and tell us whether they work or not.
    4. You didn't tell us when this homework assignment is due or that you needed a query.
    This isn't a coding service. The forum is to help you with questions or issues you are having with YOUR queries.
    No one can write a query without having a table. If you want help post the info requested above.

  • Exception thrown while trying to acquire data from Profile Data Control

    I created a new WebCenter Portal Application (with JDeveloper 11.1.1.4).
    Then tried to acquire data from Profile Data Control through getProfile().WCUserProfile to create a read-only form with profile data.
    After deploying (to internal WLS) and running I got a popup saying:
    *Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.1.2.v20101104-r8475): org.eclipse.persistence.exceptions.ValidationException Exception*
    Description: Cannot acquire data source [java:comp/env/jdbc/WebCenterDS].
    Internal Exception: javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'jdbc.webcenter.CustomPortalDS' didn't find subcontext 'webcenter'. Resolved 'jdbc'; remaining name 'webcenter/CustomPortalDS']; Link Remaining Name: 'jdbc/webcenter/CustomPortalDS'
    The question is how can I create such a data source to acquire data needed?

    Hi, there's two ways, in both ways you need use the user <PRE>_WEBCENTER that RCU create.
    1 - You can go in your console and create de dataSource, as Yannick sad. You can use your production database if you want get some more real tests, or you can get some develope database and run RCU. You can copy the configuration from you WLS server that are installed webcenter to make this easy.
    2 - In develop mode you can just create a database connection name "WebCenter", just like sad here:
    http://download.oracle.com/docs/cd/E17904_01/webcenter.1111/e10148/jpsdg_people.htm#BABICGCH

  • How to find the group ids from which the mail has been sent

    Hi,
    We are able to see the list of mails have been sent to respective mail ids with the help of tcode SOST.
    Is there any way to find through which group ids the mails have been sent.
    Tehe details showing as the mail has been sent by Batchusr.
    Please suggest how to find the group id from where the the mails have been triggered.
    Regards,
    Jena.

    Hi
    This is not helpfull
    If you open any notification QM03, there you will get tab " Action Log"
    If you click on action log , there are two fileds
    Date and time for task release
    I want to fetch these fileds in one of Z report.
    I am unable to find table name for these two fileds
    Task release Date
    Task release Time
    Can we add 'QN CHANGE DATE' parameter in the selection screen (just like QN creation date) w/ range?  The user want to run the report by QN change date as well.

  • Last 6 months of data from current date

    Hi Experts,
    I have a requirement in WebI to display last 6 months of data based on current date.Actually I have a column called "Employee Contract Start date" in my report.Suppose the end user executes the report today,then he should be able to see the Employee's data whose contract started today and in the last 6months from current date.
    Also I have dimension object name "Employee Contract Start Date".
    Please be noted that I am getting the data from Bex Query and I am working on BO 4.1 version.
    I have Objects "Calender day" , "Cal.year/Month" , "Calender month" , "Employee Contract Start Date" in the BEx Query.
    Could anyone please propose me, what are the ways to meet this requirement?

    Hi Cris,
    We can get the 6 Months date in webi.
    Check the below blog , will help you.
    http://scn.sap.com/community/businessobjects-web-intelligence/blog/2014/01/21/time-variablesdimensions
    Regards,
    Javed

  • How to change value date from posting date to net due date

    Hi Gurus,
    My client wants to change value date from posting date to net due date. currently posting date is considered as value date but in future client wants to change value date to net due date of documents.
    1. what configurations need to be maintained to change value date from posting date to net due date.
    2. Will these changes effect automatic payment run.
    Thanks and Regards,
    Suresh

    Hi Suresh,
    In Future
    While posting the documents you can mention the value date as due date of the documents.
    For already posted documents
    You can change the value date to net due date.
    If the value date is display mode i.e. if you are not able to change the value date in FB02 (Document Change Mode), use OB32 transaction and make value date field as eidtable (BSEG-VALUT).
    In OB32 transaction enter all the required fields like Account type, transaction type, company code and finally activate the Field can be changed check box.
    But not sure, whether we can change the value date to previous date or not?
    This would help you..
    Regards,
    Praisty
    Edited by: Praisty on Jul 28, 2009 9:56 AM

Maybe you are looking for

  • Link button in data grid

    hi Can anyone tell me why the click action is not working when the link button is placed in datagrid. <mx:DataGridColumn dataField="edit" headerText=""> <mx:itemRenderer> <mx:Component> <mx:LinkButton label="edit" click = "click1();"> </mx:LinkButton

  • Flickering and cpufreq

    I have been playing around with arch for a week and I'm very impressed.  Indeed it is a great distribution.  It gives the user the power and flexibility to do anything while keeping things simple. Now on to my problem!  I get flickering on the screen

  • Photos are gone from my iWeb page

    Hello, I have iWeb 3.0.2(489) I hope I am in the correct place. When I first got iWeb, I hadn't figured out how to create a separate iWeb for each of the categories, so I have one page, with several titles on the top, and I can just click on each "ti

  • Lsmw task list more rows of descrption

    hi all iam doing recording of task list ia05 in lsmw but i can only 21 rows of operation description i ahve to scroll down to make recording down but in source field the field names again start form 01,02 instated of 21,22,23 how can i a make lsmw of

  • URL Rewriting Session ID Length in iPlanet Application Server

    Hi there, Does anyone know what the maximum length of the session ID value is when using URL rewriting/encoding for session tracking (i.e.: ";jessionid=1234" appended to the end of the URL) with iPlanet Application Server 6.0's servlet container (or