Search Results

Search found 14145 results on 566 pages for 'date formatting'.

Page 10/566 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • formatting and converting in java

    - by mike_hornbeck
    I have few small basic problems : How to format : int i = 456; to give output : ""00000456" ? I've tried %08d but it's not working. Next thing is a problem with conversion and then formatting. I have side and height of triangle, let's say int's 4,7, and 7 is the height. From formula for field we know that F=1/2(a*h). So how to get F as float, with precision up to 10 places ? float f = a*h; works fine, but multiplying it by 0.5 gives error and by 1/2 returns 0.

    Read the article

  • Compare two date whit jquery

    - by Mercer
    Hello, i have two String fields who represent Date in my page and i would to compare this two fields to know if my first date < second date <tr> <td align="right">First Date: </td> <td align="left"> <html:text name="addPublicationForm" styleId="firstDate" property="firstDate" maxlength="10"/></td> </tr> <tr> <td align="right">Second Date: </td> <td align="left"> <html:text name="addPublicationForm" styleId="secondDate" property="secondDate" maxlength="10"/></td>

    Read the article

  • Search for files after a relative date using Windows search

    - by Zoredache
    I am looking for a way to save a search that includes a relative date. Specifically I am looking for a way to save a search that matches files that have a modification date that is 7 days ago. I have read the Windows Search Advanced Query Syntax document and I am not seeing a way to say 7 days ago. The numbers and ranges section does mention that relative dates are possible. The problem is that the relative dates described there do not fit the criteria I need. The lastweek almost looks like what I want except if I run a query like after:lastweek on a Monday it will only show my file that have been modified since Sunday at 12:00. The lastweek/lastmonth seem to relative to the start of the week/month which is not what I need. Multi-word relative dates: week, next month, last week, past month, or coming year. The values can also be entered contracted, as follows: thisweek, nextmonth, lastweek, pastmonth, comingyear. One nice thing about saved searches is that they are stored as an XML document and the file format is documented. I am not seeing how to form a correct value for a datetime. If I was able to understand this format, I suspect I could use a text editor and created a saved search that does what I want. Fragment from the examples: <conditions> <condition type="leafCondition" valuetype="System.StructuredQueryType.DateTime" property="System.DateModified" operator="imp" value="R00UUUUUUUUZZXD-30NU" propertyType="wstr" /> </conditions> To summarize I am looking for an answer to one or both of these questions How do I make a query for '7 days ago' using the standard syntax? How is the DateTime stored in a saved search?

    Read the article

  • Date query with Hibernate on Timestamp Column in PostgreSQL

    - by Shashikant Kore
    A table has timestamp column. A sample value in that could be 2010-03-30 13:42:42. With Hibernate, I am doing a range query Restrictions.between("column-name", fromDate, toDate). The Hibernate mapping for this column is as follows. <property name="orderTimestamp" column="order_timestamp" type="java.util.Date" /> Let's say, I want to find out all the records that have the date 30th March 2010 and 31st March 2010. A range query on this field is done as follows. Date fromDate = new SimpleDateFormat("yyyy-MM-dd").parse("2010-03-30"); Date toDate = new SimpleDateFormat("yyyy-MM-dd").parse("2008-03-31"); Expression.between("orderTimestamp", fromDate, toDate); This doesn't work. The query is converted to respective timestamps as "2010-03-30 00:00:00" and "2010-03-31 00:00:00". So, all the records for the 31st March 2010 are ignored. A simple solution to this problem could be to have the end date as "2010-03-31 23:59:59." But, I would like to know if there is way to match only the date part of the timestamp column. Also, is Expression.between() inclusive of both limits? Documentation doesn't throw any light on this.

    Read the article

  • Formatting and pretty printing dates with jquery

    - by Tauren
    I need to display dates in a couple different ways in an app built with jquery. In some situations, I need the typical "yyyy-mm-dd hh:mma" type of formatting, with all of it's different permutations. In other cases, I need to show dates "pretty printed" similar to how StackOverflow does them: 5 seconds ago 12 minutes ago 3 hours ago yesterday 2 days ago My application already uses JQuery UI DatePicker which includes a formatDate() function, but as far as I can tell, there is no way to use it outside of the datepicker. I want to format dates that aren't associated with a datepicker. Is it possible to do this using DatePicker? The DateJS library can parse dates like "12 minutes ago", but as far as I can tell, it cannot take a Date object and format strings like this. It can format the typical "yyyy-mm-dd" types of formats. This library seems pretty heavy as well. John Resig's Pretty Dates looks like it can provide the pretty printing ("2 hours ago"), but it doesn't do the standard formatting. Is there not a single plugin that can do all of this? Is there a way to leverage the DatePicker code so I don't have to load multiple codebases that do the same things?

    Read the article

  • How do I improve this design for dealing with intersecting date ranges and resolving date range conf

    - by derdo
    I am working on some code that deals with date ranges. I have pricing activities that have a starting-date and an end-date to set a certain price for that range. There are multiple pricing activities with intersecting date ranges. What I ultimately need is the ability to query valid prices for a date range. I pass in (jan1,jan31) and I get back a list that says jan1--jan10 $4 , jan11--jan19 $3 jan20--jan31 $4. There are priorities between pricing activities. Some type of pricing activities have high priority, so they override other pricing activities and for certain type of pricing activities lowest price wins etc. I currently have a class that holds these pricing activities and keeps a resolved pricing calendar. As I add new pricing activities I update the resolved calendar. As I write more tests/code, it started to get very complicated with all the different cases (pricing activities intersecting in different ways). I am ending up with very complicated code where I am resolving a newly added pricing activity. See AddPricingActivity() method below. Can anybody think of a simpler way to deal with this? Could there be similar code somewhere out there? Public class PricingActivity() { DateTime startDate; DateTime endDate; Double price; Public bool StartsBeforeEndsAfter (PricingActivity pAct) { // pAct covers this pricing activity } Public bool StartsMiddleEndsAfter (PricingActivity pAct){ // early part of pAct Itersects with later part of this pricing activity } //more similar methods to cover all the combinations of intersecting } Public Class PricingActivityList() { List<PricingActivity> activities; SortedDictionary<Date, PricingActivity> resolvedPricingCalendar; Public void AddPricingActivity(PricingActivity pAct) { //update the resolvedCalendar //go over each activity and find intersecting ones //update the resolved calendar correctly //depending on the type of the intersection //this part is getting out of hand….. } }

    Read the article

  • How to set a static system date for one user or application--"Groundhog Day"

    - by aixylinux
    I have a vendor application on AIX which requires the system date to be set to an arbitrary value for QA testing purposes. The application gets its date from the system, and there is no possibility of changing it to get the date from a parameter. The application runs under a specific userid. I'd like to find a way to set the date for this application or user to a private value without affecting all the other users and applications on the system. So far the only thing I have been able to do is dedicate an LPAR to this application. Every day at midnight a root crontab job resets the date to the static value. This works, but it is wasteful of resources; and now I am faced the requirement to do this for other applications, which, of course, require different dates. Is there any clever solution to this? I need a way to create a sandboxed environment where the date returned from the system can be set to a private value. As I said, the OS is AIX, and that can't be changed for this application either.

    Read the article

  • Warning: date() expects parameter 2 to be long, string given in

    - by Simon
    its the $birthDay = date("d", $alder); $birthYear = date("Y", $alder); i dont know what it is here is my code //Dag $maxDays = 31; $birthDay = date("d", $alder); echo '<select name="day">'; echo '<option value="">Dag</option>'; for($i=1; $i<=$maxDays; $i++) { echo '<option '; if($birthDay == $i){ echo 'selected="selected"'; } echo ' value="'.$i.'">'.$i.'</option>'; } echo '</select>'; //Måned echo '<select name="month">'; $birthMonth = date("m", $alder); $aManeder = 12; echo '<option value="">Måned</option>'; for($i = 1; $i <= $aManeder; $i++) { echo '<option '; if($birthMonth == $i) { echo 'selected="selected"'; } echo ' value="'.$i.'">'.$ManderArray[$i].'</option>'; } echo '</select>'; //År $startYear = date("Y"); $endYear = $startYear - 30; $birthYear = date("Y", $alder); echo '<select name="year">'; echo '<option value="">år</option>'; while($endYear <= $startYear) { echo '<option '; if($birthYear == $endYear) { echo 'selected="selected"'; } echo ' value="'.$endYear.'">'.$endYear.'</option>'; $endYear++; } echo '</select>';

    Read the article

  • Preserve whitespace and formatting for text returned from $.get jquery call

    - by desigeek
    I have a jquery $.get() call in my app that requests an entire web page. In the callback function, I access a div in the returned page, get its data and show it on my page. The problem is that the text I get from the div does not preserve the source formatting. If the div in the requested page had say an ordered list, then when i get that text and display on my page, it shows up as a paragraph with items inline instead of being shown as a list. I do not know whether the problem is how $.get() is getting the data or in my displaying of the data. //get the page $.get($(this).attr('href'), function(data){ callbackFunc(data,myLink); }, "html"); function callbackFunc(responseText, customData){ //response has bg color of #DFDFDF var td = $("td[bgcolor='#DFDFDF']", responseText); //text to show is in div of that td var forumText = $('div', td).text(); //append new row with request data below the current row in my table var currentRow = $(customData).parent('td').parent('tr'); var toAppend = "<tr><td class='myTd' colspan='3'>" + forumText + "</td></tr>"; $(currentRow).after(toAppend); } The response data shows up like ABC in the new row I add to my div while the source page div had A B C I should add that this script is part of an extension for Google Chrome so that is my only browser that I have tested on

    Read the article

  • CSS Table Formatting to a HTML Table

    - by Rurigok
    I am attempting to provide CSS formating to two HTML tables, but I cannot. I am setting up a webpage in HTML & CSS (with the CSS in an external sheet) and the layout of the website depends on the tables. There are 2 tables, one for the head and another for the body. They are set up whereas content is situated in one middle column of 60% width, with one column on each side of the center with 20% width each, along with other table formatting. My question is - how can I format the tables in CSS? I successfully formatted them in HTML, but this will not do. This is the CSS code for the tables - each table has the id layouttable: #layouttable{border:0px;width:100%;} #layouttable td{width:20%;vertical-align:top;} #layouttable td{width:60%;vertical-align:top;background-color:#E8E8E8;} #layouttable td{width:20%;vertical-align:top;} The tables in the html document both each have, in respective order, these elements (with content inside not shown): <table id="layouttable"><tr><td></td><td></td><td></td></tr></table> Does anyone have any idea why this CSS is not working, or can write some code to fix it? If further explanation is needed, please, ask.

    Read the article

  • AWS free tier "sign up date" vs "credit card details submission date"

    - by Mayur Rokade
    I am worried about my account expiry date. I created an account on AWS in July 2013 and submitted my credit card details on 31st Oct 2013. I went in Billing Management Console/Bills section where when I click on Date, I can see months ranging from July 2013 to Nov 2013. From AWS FAQs I gathered When does the AWS free usage tier expire? The AWS free usage tier will expire 12 months from the date you sign up. So WHEN will my account expire, July 2014 (sign up date) or Oct 2014 (credit card details submission date) ?

    Read the article

  • Convert PHP date into javascript date format

    - by LeeTee
    I have a PHP script that outputs an array of data. This is then transformed into JSON using the json_encode() function. My issue is I have a date within my array and its is not in the correct javascript format. How can I convert this within PHP so it is? $newticket['ThreadID'] = $addticket; $newticket['Subject'] = $subject; //$newticket['DateCreated'] = date('d-m-Y G:H'); Instead of the above fo rthe date I need the equivilant of the javascript function new Date() When I output the above I get the following "Fri Jun 01 2012 11:08:48 GMT+0100 (GMT Daylight Time)" However, If I format my PHP date to be the same, javascript rejects it. Confused... Can anyone help?

    Read the article

  • Use of date function in PHP to output a user-friendly date

    - by Jamie
    I have a MySQL database column named DateAdded. I'd like to echo this as a readable date/time. Here is a simplified version of the code I currently have: $result = mysql_query(" SELECT ListItem, DateAdded FROM lists WHERE UserID = '" . $currentid . "' "); while($row = mysql_fetch_array($result)) { // Make the date look nicer $dateadded = date('d-m-Y',$row['DateAdded']); echo $row['ListItem'] . ","; echo $dateadded; echo "<br />"; } Is the use of the date function the best way to output a user-friendly date? Thanks for taking a look,

    Read the article

  • Convert Json date string to JavaScript date object

    - by dagda1
    Hi, I have the following JSON object which has a date field in the following format: { "AlertDate": "\/Date(1277334000000+0100)\/", "Progress": 1, "ReviewPeriod": 12 } I want to write a regular expression or a function to convert it to a javascript object so that it is in the form: { "AlertDate": "AlertDate":new Date(1277334000000), "Progress": 1, "ReviewPeriod": 12 } The above date format fails validation in the JQuery parseJSON method. I would like to convert the 1277334000000+0100 into the correct number of milliseconds to create the correct date when eval is called after validation. Can anyone help me out with a good approach to solving this? Cheers Paul

    Read the article

  • php add hours to date output wrong result

    - by i need help
    Basically what I want to do is to send an email to follow up on order placed in 3 hours later. What I try to do is to get the current date (up to hours level), then compare with the orderdate+ 3 hours, to see whether it match. Example orderdate: 2010-06-12 18, after add 3 hours should become 2010-06-12 21 However, after add hour, the final result sometimes become bigger, sometimes become smaller... something wrong. $now= date('Y-m-d H'); echo $now . "<br>"; ... ... while ($data = mysql_fetch_array ($result)) { $orderid = $data['orderid']; $orddate = $data['orddate']; $corddate= date('Y-m-d H:i:s', $orddate); $year = substr ($corddate, 0, 4); $month = substr ($corddate, 5, 2); $day = substr ($corddate, 8, 2); $hour = substr ($corddate, 11, 2); $actualorderdate= $year . "-" . $month . "-" . $day . " " . $hour; $new_time = mktime ($hour+3, 0, 0, $month, $day, $year); $year = date ('Y', $new_time); $month = date ('m', $new_time); $day= date ('d', $new_time); $hour= date ('h', $new_time); $xhourslater= $year . "-" . $month . "-" . $day . " " . $hour; echo "actualorderdate: ". $actualorderdate. " xhourslater: " . $xhourslater. "<br>"; if($now==$xhourslater) { echo "now is 3 hours later" . "<br>"; //send email follow up, then update status as sent, in order not to resend anytime in the 3rd hour. } }

    Read the article

  • Convert Date MMDDYY to Date for database Insert

    - by lesponce
    I got an array with a date set as 071712 . no / slash characters for the date, no dash. nothing, just plain 071712 (coming from a text file). I need to convert the date so I can include it in a SqlServer insert statement. I'm calling a stored procedure for the insert. So far I have this: // This is not working so far. DateTime date = Convert.ToDateTime(fileLines[4]); (date will be used as a parm for the stored procedure)

    Read the article

  • Is it possible to set the date on a Linux machine to the year 2040?

    - by Daryl Spitzer
    I need to be able to set the date on Ubuntu (8.04.4 LTS) to the year 2040 (to test something that isn't relevant to this question). Is that possible? I can run: $ sudo date -s "15 JAN 2038 18:00:00" Fri Jan 15 18:00:00 PST 2038 ...but: $ sudo date -s "15 JAN 2039 18:00:00" date: invalid date `15 JAN 2039 18:00:00' Is the limit somewhere in 2038 (or prior to Jan. 15, 2039)? Does this change with different versions of Linux?

    Read the article

  • Gnome 3 release date

    - by extropy
    Is there a timeline for Gnome 3 development? When do we get hands on the first beta builds? The only thing I know is that Gnome 3 is planned in place of Gnome 2.30. Last Gnome release was 2.26 in March 2009. Sticking to 6 month releases, 2.30 should arrive at March 2011. Is there some other date?

    Read the article

  • Cannot access client pc remotely due to time/date issue xp win2k3 environment -- REMOTE solution please

    - by Detritus Maximus
    When I run psexec to the user desktop (xp pro) I get "There is a time and/or date difference between the client and the server." I also get "access denied" when I run the at \clientname time /interactive "net time \server /set /y" command. I cannot access the machine from my win2k3 server's AD Users and Computers utilities. Is going to the machine the only way to remedy? Clarify: Going to the machine and doing the net time command works, but I want a remote solution please.

    Read the article

  • Windows 7: System date and time resets to 2007

    - by Rogue
    My desktop computer has been upgraded to Windows 7 and ever since whenever I start it up, it resets the date and time to 2007. I tried changing the battery on the motherboard thinking that it would solve, but its still the same. I didn't face this trouble when Windows XP was installed on this computer. Any ideas how to fix this?

    Read the article

  • Cannot access client pc remotely due to time/date issue xp win2k3 environment

    - by Flotsam N. Jetsam
    When I run psexec to the user desktop (xp pro) I get "There is a time and/or date difference between the client and the server." I also get "access denied" when I run the at \clientname time /interactive "net time \server /set /y" command. I cannot access the machine from my win2k3 server's AD Users and Computers utilities. Is going to the machine the only way to remedy? Clarify: Going to the machine and doing the net time command works, but I want a remote solution please.

    Read the article

  • Date Picker Control Not Displaying Proper Date (Access 2003)

    - by JPM
    Hi everyone, I just have a quick question. I am maintaining an app for my summer co-op position, and a new requirement came down today where the user requested to have a date control added to a form to mark the date of when an employee is "laid off". This control is enabled/disabled by a toggle button, and has its control source bound to a field that I added in the database. All the functionality has been added and tested, but.... The issue I am having is that the date picker is on a tab control (the 2nd page) and I am having problems trying to get the control to display the date that is stored in the field I created. I know the control is storing any changes made using it, but since the user asked to move the control over to the 2nd tab (it was on the first), it just shows today's date, not the date entered using the control. To make things a little more strange, if I place the control anywhere except the tab control, it seems to be working fine. I've even placed a textbox on the tab and set its control source to the database field, and it displays just fine. What gives? And I have registered the .ocx with Access, and as I mentioned before, the actual database is storing the data. Just not displaying it. Any ideas as to what I am doing wrong?

    Read the article

  • Filter Date using Date Picker in Yii

    - by era
    I have generated my crud screens using gii.. I have a search form, where i have put a date picker, where i give the user to select the date he wants. But the problem is that i have the date stored in seconds in the database. and i know that i can convert the date using strtotime. But then how do i filter using the search method in my model? this is my date picker <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array( 'name'=>'ordering_date', 'id'=>'ordering_date', // additional javascript options for the date picker plugin 'options'=>array( 'showAnim'=>'fold', ), 'htmlOptions'=>array( 'style'=>'height:20px;' ), )); ?> and this is my search method in my model. I want to compare the ordering_date public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. //echo $this->ordering_date; $criteria=new CDbCriteria; $criteria->compare('order_id',$this->order_id); $criteria->compare('customer_id',$this->customer_id); $criteria->compare('delivery_address_id',$this->delivery_address_id); $criteria->compare('billing_address_id',$this->billing_address_id); $criteria->compare('ordering_date',$this->ordering_date); $criteria->compare('ordering_done',$this->ordering_done,true); $criteria->compare('ordering_confirmed',$this->ordering_confirmed); $criteria->compare('payment_method',$this->payment_method); $criteria->compare('shipping_method',$this->shipping_method); $criteria->compare('comment',$this->comment,true); $criteria->compare('status',$this->status,true); $criteria->compare('total_price',$this->total_price); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }

    Read the article

  • Different ways to query this search in SQL?

    - by Bart Terrell
    I am teaching myself MS-SQL and I am trying to find different ways to find the Count of Paid and Unpaid Claims for 2012 grouped by Region from these 3 tables. If there is a returned date, the claim is unpaid if the returned date is null then the claim is paid. I will attach the code I have ran, but I am not sure if there are better ways to do it. Thanks. Here is the code: SET dateformat ymd; CREATE TABLE Claims ( ClaimID INT, SubID INT, [Claim Date] DATETIME ); CREATE TABLE Phoneship ( ClaimID INT, [Shipping Number] INT, [Claim Date] DATETIME, [Ship Date] DATETIME, [Returned Date] DATETIME ); CREATE TABLE Enrollment ( SubID INT, Enrollment_Date DATETIME, Channel NVARCHAR(255), Region NVARCHAR(255), Status FLOAT, Drop_Date DATETIME ); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (102, 201, '2011-10-13 00:00:00', '2011-10-14 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (103, 202, '2011-11-02 00:00:00', '2011-11-03 00:00:00', '2011-11-20 00:00:00'); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (103, 203, '2011-11-02 00:00:00', '2011-11-22 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (105, 204, '2012-01-16 00:00:00', '2012-01-17 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (106, 205, '2012-02-15 00:00:00', '2012-02-16 00:00:00', '2012-02-26 00:00:00'); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (106, 206, '2012-02-15 00:00:00', '2012-02-27 00:00:00', '2012-03-06 00:00:00'); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (107, 207, '2012-03-12 00:00:00', '2012-03-13 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (108, 208, '2012-05-11 00:00:00', '2012-05-12 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (109, 209, '2012-05-13 00:00:00', '2012-05-14 00:00:00', '2012-05-28 00:00:00'); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (109, 210, '2012-05-13 00:00:00', '2012-05-30 00:00:00', NULL); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (101, 12345678, '2011-03-06 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (102, 12347190, '2011-10-13 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (103, 12348723, '2011-11-02 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (104, 12349745, '2011-11-09 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (105, 12347190, '2012-01-16 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (106, 12349234, '2012-02-15 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (107, 12350767, '2012-03-12 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (108, 12350256, '2012-05-11 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (109, 12347701, '2012-05-13 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (110, 12350256, '2012-05-15 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (111, 12350767, '2012-06-30 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12345678, '2011-01-05 00:00:00', 'Retail', 'Southeast', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12346178, '2011-03-13 00:00:00', 'Indirect Dealers', 'West', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12346679, '2011-05-19 00:00:00', 'Indirect Dealers', 'Southeast', 0, '2012-03-15 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12347190, '2011-07-25 00:00:00', 'Retail', 'Northeast', 0, '2012-05-21 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12347701, '2011-08-14 00:00:00', 'Indirect Dealers', 'West', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12348212, '2011-09-30 00:00:00', 'Retail', 'West', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12348723, '2011-10-20 00:00:00', 'Retail', 'Southeast', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12349234, '2012-01-06 00:00:00', 'Indirect Dealers', 'West', 0, '2012-02-14 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12349745, '2012-01-26 00:00:00', 'Retail', 'Northeast', 0, '2012-04-15 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12350256, '2012-02-11 00:00:00', 'Retail', 'Southeast', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12350767, '2012-03-02 00:00:00', 'Indirect Dealers', 'West', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12351278, '2012-04-18 00:00:00', 'Retail', 'Midwest', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12351789, '2012-05-08 00:00:00', 'Indirect Dealers', 'West', 0, '2012-07-04 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12352300, '2012-06-24 00:00:00', 'Retail', 'Midwest', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12352811, '2012-06-25 00:00:00', 'Retail', 'Southeast', 1, NULL); And Query1 SELECT Count(ClaimID) AS 'Paid Claim', (SELECT Count(ClaimID) FROM dbo.phoneship WHERE [returned date] IS NOT NULL) AS 'Unpaid Claim' FROM dbo.Phoneship WHERE [Returned Date] IS NULL GROUP BY claimid Query2 SELECT Count(*) AS 'Paid Claims', (SELECT Count(*) FROM dbo.Phoneship WHERE [Returned Date] IS NOT NULL) AS 'Unpaid Claims' FROM dbo.Phoneship WHERE [Returned Date] IS NULL; Query3 Select Distinct(C.[Shipping Number]), Count(C.ClaimID) AS 'COUNT ClaimID', A.Region, A.SubID From dbo.HSEnrollment A Inner Join dbo.Claims B On A.SubId = B.SubId Inner Join dbo.Phoneship C On B.ClaimID = C.ClaimID Where C.[Returned Date] IS NULL Group By A.Region, A.Subid, C.ClaimID, C.[Shipping Number] Order By A.Region

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >