Questions tagged [clause]

252 questions
0
votes
1 answer

Adding more tables to search after a where clause in a Inner join clause

Please help me with this query. I have included as much info as possible about this. Here is my Query:
Schalk
  • 17
  • 5
0
votes
2 answers

Checking case in where condition oracle

This is the query i have used to check condition. So far i didn't get the solution. When am execute got error as Missing keyword. How to do this. select * from customer where status='A' and (case when trim(member_since) is not null then…
user5122076
0
votes
0 answers

Confusion with First order Propositional Logic clause

I have two propositions p and q. So is it legal to write the clause as: q ∧ p ∧ ¬ p I am assuming that, in this case p ∧ ¬ p = F will always be False, hence the clause will become q ∧ F = F resulting the whole clause as False.
triandicAnt
  • 1,328
  • 2
  • 15
  • 40
0
votes
2 answers

where condition scenario in oracle

i have requirement in where condition if my id is in 1 then it should check id 4,5,6,7 or it should check value which is in id this id i will pass as parameter to query select * from table_a where id Help me in this
Francis John
  • 171
  • 2
  • 4
  • 13
0
votes
1 answer

Solr field value in another query? is it possible?

I have this type of ouput genral "docs": [ { "id": "552e1acd5971b", "product_id": "NOT05253", "attribute_id": 0, "attribute_name": "Brend", "value_id": 12923, "value_name": "ACER", "category_id": 166, "_version_":…
0
votes
1 answer

PDO prepared statement with <> operator in where clause

I need to know how to handle <> operator used with a parameter in where clause within a prepared statement. Can anyone please show me how to do something similar to 'WHERE field <>:parameter'. Thanks. Edit : I did not remember to mention that MySQL…
Stephen Adelakun
  • 784
  • 2
  • 7
  • 24
0
votes
1 answer

MYSQL where clause causes syntax error

I just cannot find what is wrong with this simple statement: $stat_qry = mysql_query("SELECT * FROM stats WHERE group=$galgroup") or die("STATS ERROR: ".mysql_error()); $stat = mysql_fetch_array($stat_qry); i just get: "STATS ERROR: You have an…
Mystic
  • 147
  • 1
  • 14
0
votes
3 answers

How to query using LIKE clause in mysql using vb.net comparing to a varied string input?

I've search and tried a lot of procedure but did not work. CREATE PROCEDURE did not work, SET @variable is not acceptable and a couple more codes. This is my last "query" code that still didn't work. qry = "select * from employeefile where empfname…
MAC
  • 676
  • 3
  • 13
  • 32
0
votes
1 answer

Update long SQL query with TOP clause

I'm not familiar with sql servers. I've very long query which took from other tech guy. I need update this query with top clause for filter first 10 results. I added TOP 10 after first SELECT, but not working as expected. SELECT SalesTranHeader.id,…
Gereltod
  • 2,043
  • 8
  • 25
  • 39
0
votes
1 answer

Prestashop - List view filter

I insert an other column in the list view of my module inserting the values with getList function, I modified the sql to filter in the renderList function but I can't use the alias in where clause. How can I fix it? The error i got is the…
Jon
  • 62
  • 6
0
votes
4 answers

WHERE LIKE not displaying correct results

I have a WHERE LIKE clause in my query that is not displaying the correct results. My query is as follows; SELECT book.isbn, book.title, copy.code, copy.duration, student.no, student.name FROM book INNER JOIN copy ON copy.isbn = book.isbn INNER…
Yaz
  • 55
  • 3
  • 10
0
votes
0 answers

resolving a clause. Resolved A and B yields

I was wondering why the following resolutions yield true and none rather than (A !D) and (A B C !D): Resolve (A B C) & (!B !C !D) yields true Resolve (A B C) & (B C !D) yields none.
user3088470
  • 603
  • 2
  • 8
  • 14
0
votes
3 answers

SQL: using clause with "ORDER BY"

I have a list of orders in a SQL table, and for each order I have a ship-to country code. example: order country_code X00145 GB X00178 FR D55454 AL E54566 GB F59565 IE O84849 ES K54545 US N61465 GB W65478 GB I am…
Matt Alice
  • 41
  • 3
0
votes
1 answer

How to return directory (Xquery path) as a value and not as a string of that path?

When writing this code for Basex { for $hotel in doc("tourism.xml")/tourism/hotel let $r:=$hotel/room let $g:=doc("tourism.xml")/tourism/guest where $g/@name="Udo Lindenberg" and $g/customer/@hotel=$hotel/@id and…
0
votes
0 answers

View in MySQL has bad performance because of where-clause handling

I have a problem with my MySQL database. I got an expensive query with some joins. But i run it always for one specific id, which makes the execution very fast. Now, i put this query into a view. If i query this view and use the where clause with…
moritz.vieli
  • 1,747
  • 1
  • 14
  • 17