Search Results

Search found 13454 results on 539 pages for 'left'.

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

  • How to declare a div in @page @top-left

    - by icon911
    How do I declare that a DIV should be displayed in top-left corner of every page and not in its relative position. I have a div like: <div id=header>Document</div> and I would like to display it on every page in top left corner using css like: @page { size: 8.5in 11in; margin: 0.25in; border: thin solid black; padding: 1em; @top-left { content: ???? ; } } Thank you.

    Read the article

  • Left outer joins that don't return all the rows from T1

    - by Summer
    Left outer joins should return at least one row from the T1 table if it matches the conditions. But what if the left outer join performs a join successfully, then finds that another criterion is not satisfied? Is there a way to get the query to return a row with T1 values and T2 values set to NULL? Here's the specific query, in which I'm trying to return a list of candidates, and the user's support for those candidates IF such support exists. SELECT c.id, c.name, s.support FROM candidates c LEFT JOIN support s on s.candidate_id = c.id WHERE c.office_id = 5059 AND c.election_id = 92 AND (s.user_id = 2 OR s.user_id IS NULL) --This line seems like the problem ORDER BY c.last_name, c.name The query joins the candidates and support table, but finds that it's a different user who supported this candidate (user_id=3, say). Then the candidate disappears entirely from the result set.

    Read the article

  • MYSQL: COUNT with GROUP BY, LEFT JOIN and WHERE clause doesn't return zero values

    - by Paul Norman
    Hi guys, thanks in advance for any help on this topic! I'm sure this has a very simply answer, but I can't seem to find it (not sure what to search on!). A standard count / group by query may look like this: SELECT COUNT(`t2`.`name`) FROM `table_1` `t1` LEFT JOIN `table_2` `t2` ON `t1`.`key_id` = `t2`.`key_id` GROUP BY `t1`.`any_col` and this works as expected, returning 0 if no rows are found. So does: SELECT COUNT(`t2`.`name`) FROM `table_1` `t1` LEFT JOIN `table_2` `t2` ON `t1`.`key_id` = `t2`.`key_id` WHERE `t1`.`another_column` = 123 However: SELECT COUNT(`t2`.`name`) FROM `table_1` `t1` LEFT JOIN `table_2` `t2` ON `t1`.`key_id` = `t2`.`key_id` WHERE `t1`.`another_column` = 123 GROUP BY `t1`.`any_col` only works if there is at least one row in table_1 and fails miserably returning an empty result set if there are zero rows. I would really like this to return 0! Anyone enlighten me on this? Beer can be provided in exchange if you are in London ;-)

    Read the article

  • Horizontal scroll in rich:panel to default right to left

    - by TaylorSmolik
    I have a rich:panel with a style="overflow: scroll" tag inside. By default, the scroll slides left to right. I am constantly adding a new dataTable to a dataGrid with the click of a button and I want the user to always see the most recent one, and since I have it set up so that each dataTable is added as a column to the dataGrid, the most recent one will always be on the right side of the dataGrid. Is there a way I can default the scroll to go right to left? Or maybe creating the columns from right to left?

    Read the article

  • Next Div Does not appear correctly after floating two divs to right and left

    - by user3703669
    I have floated two divs to left and right...But the next div after those two divs does not appear correctly... My code is follows #Div1{ position: relative; float: left; } #Div2{ position: relative; float: right; } And the display as follows <div id="Div1">This is aligned to left on the same x axis</div> <div id="Div2">This is aligned to right on the same x axis</div> <div style="color: red;">After the alignment this div does not align</div> The output is as follows http://i.stack.imgur.com/8A6hz.png But I expect something like this http://i.stack.imgur.com/wVGN6.png Anyway to accomplish this task ?? Please HELP!! Urgent help needed!!!

    Read the article

  • How do I join these queries?

    - by GregoryD
    query1: SELECT category.id, category.name, category.level, category.description, category.cat1, category.cat2, category.cat3, category.cat4, category.pri_color, category.sec_color, category.last_report AS report_id FROM category, reports_category_layout WHERE category.id = reports_category_layout.catID AND reports_category_layout.site_code = 'las' query2: SELECT DISTINCT category.id, COUNT(forum.id) AS posts, SUM(forum.view) AS views FROM category, forum WHERE category.id = forum.catID AND forum.approved = 'yes' AND forum.site_code = 'las' GROUP BY category.id query3: SELECT forum.catID, forum.title, forum.paragraph, forum.created, users.alias, forum.userID FROM forum, users, forum_cache WHERE forum.catID = forum_cache.catID AND forum.id = forum_cache.last_report AND users.id = forum.userID AND forum.approved = 'yes' Essentially, I am unsure about the syntax to join these properly. I have written a query that simply joins them, but in the case that the forum cache table contains an unapproved forum id, it will simply not return the entire row. what I really need is for query1 and query2 to be left joined on the category id, and for query 3 to be left outer joined on id = catID.

    Read the article

  • SQL: Gather right hand values from a join

    - by Max Williams
    Let's say a question has many tags, via a join table called taggings. I do a join thus: SELECT DISTINCT `questions`.id FROM `questions` LEFT OUTER JOIN `taggings` ON `taggings`.taggable_id = `questions`.id LEFT OUTER JOIN `tags` ON `tags`.id = `taggings`.tag_id I want to order the results according to a particular tag name, eg 'piano', so that piano is at the top, then by all the other tags in alphabetical order. Currently i'm using this order clause: ORDER BY (tags.name = 'piano') desc, tags.name Which is going completely wrong - the first results i get back aren't even tagged with 'piano' at all. I think my problem is that i need to group the tag names somehow and do my ordering test against that: i think that doing it against the straight tags.name isn't working due to the structure of the resultant join table (it does work if i just do a simple select on the tags table) but i can't get my head around how to fix it. grateful for any advice, max

    Read the article

  • Feeding a Drill Down Menu with categories, subcategories and subSubcategories from a database

    - by Hassan
    Hi everyone, I have a Drill Down menu and I want to have it gets its elements from a database, I am using php and MySQL and the table (categories) looks like this : http://yfrog.com/jctablehsj I can't figure out how I can extract these information in a way I could put it inside the Drill Down Menu ! I found the recursive method (with LEFT JOINs) and the nested method which I barely understood and again I couldn't apply it to the Drill Down Menu. I found that some people found out a solution with left join and group by but couldn't understand or copy their example ! I would be more than gratefull if you could give me the extact of the query. Thanks a lot for your hard work, Hassan

    Read the article

  • How to change handedness of coordinates?

    - by 742
    How to convert from Euler's coordinates E1 = (x1, y1, z1, yaw1, pitch1, roll1) to E2 = (x2, y2, z2, yaw2, pitch2, roll2) where x, y, z are the coordinates of a point and yaw, pitch, roll the direction/orientation of a vector which origin is the point. yaw is around y, pitch around x, roll around z. They are performed in that order. Yaw 0 is normal to the plan xy (opposite to z in E1 and equal to z in E2). E1 uses a right handed space and E2 a left handed space. Both have the same origin, the same direction for y (top) and z (into the screen). They differ by x which is to the left on E1 and to the right on E2. They also differ by their direction of positive rotations. I've a custom type to hold the scalar representation and to convert from and to the equivalent WPF Matrix3d representation.

    Read the article

  • SQL joins "going up" two tables

    - by blcArmadillo
    I'm trying to create a moderately complex query with joins: SELECT `history`.`id`, `parts`.`type_id`, `serialized_parts`.`serial`, `history_actions`.`action`, `history`.`date_added` FROM `history_actions`, `history` LEFT OUTER JOIN `parts` ON `parts`.`id` = `history`.`part_id` LEFT OUTER JOIN `serialized_parts` ON `serialized_parts`.`parts_id` = `history`.`part_id` WHERE `history_actions`.`id` = `history`.`action_id` AND `history`.`unit_id` = '1' ORDER BY `history`.`id` DESC I'd like to replace `parts`.`type_id` in the SELECT statement with `part_list`.`name` where the relationship I need to enforce between the two tables is `part_list`.`id` = `parts`.`type_id`. Also I have to use joins because in some cases `history`.`part_id` may be NULL which obviously isn't a valid part id. How would I modify the query to do this?

    Read the article

  • How to optimise MySQL query containing a subquery?

    - by aidan
    I have two tables, House and Person. For any row in House, there can be 0, 1 or many corresponding rows in Person. But, of those people, a maximum of one will have a status of "ACTIVE", the others will all have a status of "CANCELLED". e.g. SELECT * FROM House LEFT JOIN Person ON House.ID = Person.HouseID House.ID | Person.ID | Person.Status 1 | 1 | CANCELLED 1 | 2 | CANCELLED 1 | 3 | ACTIVE 2 | 1 | ACTIVE 3 | NULL | NULL 4 | 4 | CANCELLED I want to filter out the cancelled rows, and get something like this: House.ID | Person.ID | Person.Status 1 | 3 | ACTIVE 2 | 1 | ACTIVE 3 | NULL | NULL 4 | NULL | NULL I've achieved this with the following sub select: SELECT * FROM House LEFT JOIN ( SELECT * FROM Person WHERE Person.Status != "CANCELLED" ) Person ON House.ID = Person.HouseID ...which works, but breaks all the indexes. Is there a better solution that doesn't? I'm using MySQL and all relevant columns are indexed. EXPLAIN lists nothing in possible_keys. Thanks.

    Read the article

  • Help with MySQL Query?

    - by Devyn
    I have two tables rooms and users. I want to get only rooms.room_id, users.user_name with user_id = 1. I can get the result of all users with following sql... select rooms.room_id, rooms.user_id, users.user_name from rooms LEFT JOIN users ON rooms.user_id = users.user_id When I do like this to filter the result with user_id = 1 ... I got error. select rooms.room_id, rooms.user_id, users.user_name from rooms where rooms.user_id = 1 LEFT JOIN users ON rooms.user_id = users.user_id What should I do?

    Read the article

  • Want to avoid the particular rows from select join query... See description

    - by OM The Eternity
    I have a Select Left Join Query whis displays me the rows for the latest changedone(its a time) column name ("field" should not be equal) column name ("trackid" should not be equal), and column name "Operation should be "UPDATE" ", below is the query I am talking about... SELECT j1. * FROM jos_audittrail j1 LEFT OUTER JOIN jos_audittrail j2 ON ( j1.trackid != j2.trackid AND j1.field != j2.field AND j1.changedone < j2.changedone ) WHERE j1.operation = 'UPDATE' AND j2.id IS NULL Now here I don't want a row to be displayed with a two particular column's value i.e. "field's value" the value is "LastvisitDate" and "hits" Now if if append the condition in the above query that " AND j1.field != 'lastvistDate' AND j1.field != 'hits' " theni do not get any result... The table structure is jos_audittrail: id trackid operation oldvalue newvalue table_name live changedone(its a time) I hope i have given the details properly If u still find something missing I will try to provide it more better way... Pls help me to avoid those two rows with those to mentioned value of "field"

    Read the article

  • PHP bitwise left shifting 32 spaces problem and bad results with large numbers arithmetic operations

    - by Victor Stanciu
    Hello, I have the following problems: First: I am trying to do a 32-spaces bitwise left shift on a large number, and for some reason the number is always returned as-is. For example: echo(516103988<<32); // echoes 516103988 Because shifting the bits to the left one space is the equivalent of multiplying by 2, i tried multiplying the number by 2^32, and it works, it returns 2216649749795176448. Second: I have to add 9379 to the number from the above point: printf('%0.0f', 2216649749795176448 + 9379); // prints 2216649749795185920 Should print: 2216649749795185827

    Read the article

  • Regex: Search and replace left side = to right side

    - by ctrlShiftBryan
    How do I use regular expressions and search and replace to turn this [UserID] = <UserID, int,> [UserID] = 123123 [UserID] = asd123123 into [UserID] = [UserID] [UserID] = [UserID] [UserID] = [UserID] In other words I want to take everything from left side of the line up to the '=' character and replace everything on the right side of the '=' with the match from the left side. We can assume a line break at the end of each line. What are my Find what: and Replace with: values?

    Read the article

  • DataGridView's top left cell value is not displayed.

    - by Spike
    I have a DataGridView, without visible row or column headers, and bound to a BindingList. No matter what I try the top left cell (Rows[0].Cells[0]) is always empty. The cell's Visible property is true, but it never displays its contents. If I make some rows and columns invisible, it's still the top left of the visible cells that isn't displayed.

    Read the article

  • LINQ aggregate left join on SQL CE

    - by P Daddy
    What I need is such a simple, easy query, it blows me away how much work I've done just trying to do it in LINQ. In T-SQL, it would be: SELECT I.InvoiceID, I.CustomerID, I.Amount AS AmountInvoiced, I.Date AS InvoiceDate, ISNULL(SUM(P.Amount), 0) AS AmountPaid, I.Amount - ISNULL(SUM(P.Amount), 0) AS AmountDue FROM Invoices I LEFT JOIN Payments P ON I.InvoiceID = P.InvoiceID WHERE I.Date between @start and @end GROUP BY I.InvoiceID, I.CustomerID, I.Amount, I.Date ORDER BY AmountDue DESC The best equivalent LINQ expression I've come up with, took me much longer to do: var invoices = ( from I in Invoices where I.Date >= start && I.Date <= end join P in Payments on I.InvoiceID equals P.InvoiceID into payments select new{ I.InvoiceID, I.CustomerID, AmountInvoiced = I.Amount, InvoiceDate = I.Date, AmountPaid = ((decimal?)payments.Select(P=>P.Amount).Sum()).GetValueOrDefault(), AmountDue = I.Amount - ((decimal?)payments.Select(P=>P.Amount).Sum()).GetValueOrDefault() } ).OrderByDescending(row=>row.AmountDue); This gets an equivalent result set when run against SQL Server. Using a SQL CE database, however, changes things. The T-SQL stays almost the same. I only have to change ISNULL to COALESCE. Using the same LINQ expression, however, results in an error: There was an error parsing the query. [ Token line number = 4, Token line offset = 9,Token in error = SELECT ] So we look at the generated SQL code: SELECT [t3].[InvoiceID], [t3].[CustomerID], [t3].[Amount] AS [AmountInvoiced], [t3].[Date] AS [InvoiceDate], [t3].[value] AS [AmountPaid], [t3].[value2] AS [AmountDue] FROM ( SELECT [t0].[InvoiceID], [t0].[CustomerID], [t0].[Amount], [t0].[Date], COALESCE(( SELECT SUM([t1].[Amount]) FROM [Payments] AS [t1] WHERE [t0].[InvoiceID] = [t1].[InvoiceID] ),0) AS [value], [t0].[Amount] - (COALESCE(( SELECT SUM([t2].[Amount]) FROM [Payments] AS [t2] WHERE [t0].[InvoiceID] = [t2].[InvoiceID] ),0)) AS [value2] FROM [Invoices] AS [t0] ) AS [t3] WHERE ([t3].[Date] >= @p0) AND ([t3].[Date] <= @p1) ORDER BY [t3].[value2] DESC Ugh! Okay, so it's ugly and inefficient when run against SQL Server, but we're not supposed to care, since it's supposed to be quicker to write, and the performance difference shouldn't be that large. But it just doesn't work against SQL CE, which apparently doesn't support subqueries within the SELECT list. In fact, I've tried several different left join queries in LINQ, and they all seem to have the same problem. Even: from I in Invoices join P in Payments on I.InvoiceID equals P.InvoiceID into payments select new{I, payments} generates: SELECT [t0].[InvoiceID], [t0].[CustomerID], [t0].[Amount], [t0].[Date], [t1].[InvoiceID] AS [InvoiceID2], [t1].[Amount] AS [Amount2], [t1].[Date] AS [Date2], ( SELECT COUNT(*) FROM [Payments] AS [t2] WHERE [t0].[InvoiceID] = [t2].[InvoiceID] ) AS [value] FROM [Invoices] AS [t0] LEFT OUTER JOIN [Payments] AS [t1] ON [t0].[InvoiceID] = [t1].[InvoiceID] ORDER BY [t0].[InvoiceID] which also results in the error: There was an error parsing the query. [ Token line number = 2, Token line offset = 5,Token in error = SELECT ] So how can I do a simple left join on a SQL CE database using LINQ? Am I wasting my time?

    Read the article

  • Qt double click check left button mouse

    - by Alex Ivasyuv
    I need to run slot only on doubleClick with left button mouse, instead of both. connect(this -> myComponent, SIGNAL (doubleClicked (const QModelIndex & )), this, SLOT (performSomeAction(const QModelIndex & ))); With this event, double click works in both cases, but needed only with left button click. How I can do it? this - myComponent = QTableView

    Read the article

  • i have some problem with left join JPQL

    - by Dora
    there is something wrong with ths way i use left join, and i dont understand what am i doing wrong. can you see it? select distinct r.globalRuleId, r.ruleId, sv.validFrom, pm.moduleId, nvl(min(rai.failedOnRegistration),0) from TRules r, TSlaVersions sv, TModuleFormulas mv, TPendingModule pm, left join TRulesAdditionalInfo rai on r.ruleId = rai.ruleId where r.slaVersionId = sv.slaVersionId and r.formulaId = mv.pk.formulaId and mv.pk.moduleId = pm.moduleId group by r.globalRuleId, r.ruleId, sv.validFrom, pm.moduleId order by pm.moduleId

    Read the article

  • Using subselect to accomplish LEFT JOIN

    - by Andre
    Is is possible to accomplish the equivalent of a LEFT JOIN with subselect where multiple columns are required. Here's what I mean. SELECT m.*, (SELECT * FROM model WHERE id = m.id LIMIT 1) AS models FROM make m As it stands now doing this gives me a 'Operand should contain 1 column(s)' error. Yes I know this is possible with LEFT JOIN, but I was told it was possible with subselect to I'm curious as to how it's done.

    Read the article

  • Count white spaces to the left of a line in a text file using C++

    - by insertable
    Hi all, I am just trying to count the number of white spaces to the LEFT of a line from a text file. I have been using count( line.begin(), line.end(), ' ' ); but obviously that includes ALL white spaces to the left, in between words and to the right. So basically what I'm wanting it to do is once it hits a non-space character stop it from counting the white spaces. Thanks everyone.

    Read the article

  • Making an rtf document right to left

    - by Joker
    I hava an rtf document. I want to change the entire document to be right to left instead of left to right in code. i know the rtf specification is a standard, and should probably use rtldoc (http://msdn.microsoft.com/en-us/library/aa140283(office.10).aspx) only problem is I don't know where to put it. Any other way?

    Read the article

  • Left Outer Join on Many-to-One Mapping

    - by Colin Bowern
    I have a reference to call that may or may not be there. When I add the nullable option it still doing Inner Join when I want an Outer Left Join (show the left even if the right is null). Is this possible in the NH map? References(x => x.DefaultCategory, "CATEGORY_ID") .Nullable();

    Read the article

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