I have a query that retrieves some data, among those data I have some that are returned with a value like 0. I would like the query to NOT return the columns when that's the case.
How can we do such a thing?
Regards,
MEM
...
I've got the following SQL, but I only want to return rows where 'hits' are greater than 10.
SELECT clicks.affiliate, COUNT(*) AS hits, affiliates.title, affiliates.url
FROM clicks
INNER JOIN affiliates ON affiliates.id = clicks.affiliate
GROUP BY clicks.affiliate
Thanks.
...
What is wrong in this query running on MS Access 2003 database.
It works fine if fields are not empty, but when any of the fields is empty it results empty string.
SELECT CustomerName,IIF(Address1="","",Address1)+IIF(Address1&
Address2="","",",")+IIF(Address2="","",Address2)+IIF(Address1&Address2&
Address3="","",",")+IIF(Address3=" ","...
It's been a crappy Monday AM and I can't think straight. Can someone help me figure out how to group/sum the rows returned so that there is only ONE instance of the AssessorParcelNumber?
So, instead of the following result set:
140-31-715-164 3545 2004-09-14 00:00:00.000 1665.00 0.00 0.00 1665.00
140-31-715-164 3545 2004...
I am working on EF with C# and WPF as front end. I need to provide a UI for so user can create his own query and get the result. The UI will be list of tables and list of columns to select from (Not happy with UI. Need to improve but new ticks in my mind).
So my question is how create, merge(existing query) and execute the queries.
The...
I've run into quite a tough problem for my novice SQL query writing skills. I'll try and describe my problem as best I can.
Table1:
Account, Date, Time, Area, ResultValue, ResultString, Phone, GUID
Table2: Name, Account, phone, GUID
For each record in Table2 I need the the single record from Table1 that is most accurate to the follow...
We have a SQL Server database with a million-ish records that are indexed by Lucene.net through Nhibernate.Search. When we built the index for our classes, we tried to be extensive since the cost for indexing/retrieval was really small. The goal was to offer full-text searching to users on a webpage with pagination.
Since SQL Server com...
I have a table of banners. Banners are marked with size id and slot id(position on page)
I need to pick 8 banners of one size, 1 for each slot between 11-18(slot id) and keep randomness each page view, so that each time banners were different if there any different for required slot.
The only solution i have found is this:
SELECT *
FR...
I have data like this in oracle database -> 20123,45 ,data type is varchar.
and I want to migrate it to column with NUMBER data type, change comma (,) to dot (.).
so expected result is 20123.45 and data type is NUMBER,
how can I do that ?
thanks before :D
...
Hello,
I do have a little expierence with database tables, but I can't read a db_query
I believe to have a query which should enable a product as a bestseller and place it in scroller. I want to fake a bestseller because it looks a little dump when opening a webshop with having a empty bestseller list.
I have manually altered the table...
Hi there...
I am creating a desktop application in C# where my code is :
private void btnLogin_Click(object sender, EventArgs e)
{
if (clsFunctions.recordExist("SELECT AtNumConstructorID, TxtConstructorName AS Fullname FROM tblConstructorDetails WHERE txtUserName = '" + txtUserName.Text + "' AND TxtPassword LIKE '" ...
I have the following entity (not exact but gives a general idea):
@Entity
public class WebElement implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
private Long id;
@ManyToMany(fetch = FetchType.EAGER, cascade = { CascadeType.ALL })
private Set<CoreElement> coreElements;
...
Hi, I need a code with which I can send queries to Google and get the results back for some processing. i am mostly interested in retrieving the snippets of the results. It would be nice if I can do this without installing any extra packages for Python. A pre-written api would also do the trick.
Thanks
...
I have this data in postgresql
id | rate | hrv | activity | orientation | timestamp | user_id | status
----------+-----------+-----+----------+-------------+------------------------+---------+--------------
66764728 | 72 | 1 | 0 | 90 | 2010-06-10 18:54:54+00 | 397 | t
66764729 | ...
Hello,
I am interested in creating a visual linq editor (like provided in sql server management studio). which i want to use in my application to give end user the ability to create linq queries on dataset.
I tried to understand VLINQ, but i am unable to understand, how can i use it as a starting point.
Can someone please guide me or poi...
Hi,
I need to write a query like SELECT substring(variable, startPosIndex, endPos) from Blah blah ;
startPostIndex = indexPosition('#')
endPos = lenght(variable) - 1;
So basically my query to access will be
SELECT substring(variable, indexPosition('#'), lenght(variable) - 1) from Blah blah ;
The query that I have written to get if...
Hello there,
How to make query in sql to delete all record exist in every table.
There possible to write every name table using command delete. But it will take long time to write every single name table.
I am already try DELETE FROM * in MySQL but it got error:
You have an error in your SQL syntax; check the manual that correspond...
An import was performed on my database which wasn't done so well. It's resulted in some fields being empty where they shoudln't, etc...
What I need to do now is move all the data from one column in one table into a column in a different table. Both tables have an ID which is a link to each rows.
For example:
Table1
id | linkID | emai...
SELECT * FROM TABLE1
ID Name
1 SOF
2 USER
I want query which can one or two or four .... times ID = 1 in row like
What will be the Query of this in Ms.Access?
ID Name
1 SOF
1 SOF
1 SOF
2 USER
...
I'll use the generic blog example.
class Post < ActiveRecord::Base
has_many :comments
end
class Comment < ActiveRecord::Base
belongs_to :post
end
When querying Post, how do you access its associations (i.e. :comments)?
This should be the easiest thing in the world, but I haven't found any documentation on it. Even http://edgeguid...