Browsing Questions About query (2)
How can I monitor the executed sql statements on a ms SQL server 2005
In a project of mine the SQL statements that are executed against a ms SQL server are failing for some unknown reason. Some of the code is already used in production so debugging it is not an easy task. Therefore I need a way to see in the database itself what SQL statements are used, as the state…
SQL Query to get latest price
I have a table containing prices for a lot of different "things" in a MS SQL 2005 table. There are hundreds of records per thing per day and the different things gets price updates at different times.
ID uniqueidentifier not null,
ThingID int NOT NULL,
PriceDateTime datetime NOT NULL,
Price dec…
What table/view do you query against to select all the table names in a schema in Oracle?
What object do you query against to select all the table names in a schema in Oracle?
How to force nolock hint for sql server logins
Does anyone know of a way to force a nolock hint on all transactions issued by a certain user? I'd like to provide a login for a support team to query the production system, but I want to protect it by forcing a nolock on everything they do. I'm using SQL Server 2005.
Which is faster/best? SELECT * or SELECT column1, colum2, column3, etc
I've heard that SELECT * is generally bad practice to use when writing SQL commands because it is more efficient to SELECT columns you specifically need.
If I need to SELECT every column in a table, should I use SELECT * or SELECT column1, colum2, column3, etc.
Does the efficiency really mat…
SharePoint Content Query Web Part
I have a content query web part that queries by content type against a site collection. I have grouped it by content type so I have:
-- Agenda (Content Type)
----Agenda #1
----Agenda #2
-- Report (Content Type)
----Report #1
----Report #2
I would like to show a second grouping for site, so:…
SQL Query - Use Like only if no exact match exists?
I'm having an issue with a query that currently uses
LEFT JOIN weblog_data AS pwd ON (pwd.field_id_41 != '' AND pwd.field_id_41 LIKE CONCAT('%', ewd.field_id_32, '%'))
however I'm discovering that I need it to only use that if there is no exact match first. What's happening is that the quer…
How to programmatically make a Query in MS Access default to landscape when printed
How can I programmatically make a query in MS Access default to landscape when printed, specifically when viewing it as a PivotChart? I'm currently attempting this in MS Access 2003, but would like to see a solution for any version.
SQL Text Searching, AND Ordering
I have a query:
SELECT *
FROM Items
WHERE column LIKE '%foo%'
OR column LIKE '%bar%'
how do I order the results?
lets say I have rows that match 'foo' and rows that match 'bar' but I also have a row with 'foobar'
how do I order the returned rows so that the first results are the ones t…
How do I return random numbers as a column in SQL Server 2005?
I'm running a SQL query on SQL Server 2005, and in addition to 2 columns being queried from the database, I'd also like to return 1 column of random numbers along with them. I tried this:
select column1, column2, floor(rand() * 10000) as column3 from table1
...which kinda works, but the pro…
How do you create a parameterized query in MS Access 2003 and use other queries/forms to fill the parameters and obtain a resultset
I'd like to be able to create a parameterized query in MS Access 2003 and feed the values of certain form elements to that query and then get the corresponding resultset back and do some basic calculations with them. I'm coming up short in figuring out how to get the parameters of the query to be …
Practical limit to length of SQL query (specifically MySQL)
Is it particularly bad to have a very, very large SQL query with lots of (potentially redundant) WHERE clauses?
For example, here's a query I've generated from my web application with everything turned off, which should be the largest possible query for this program to generate:
SELECT * FRO…
How can I make MS Access Query Parameters Optional?
I have a query that I would like to filter in different ways at different times. The way I have done this right now by placing parameters in the criteria field of the relevant query fields, however there are many cases in which I do not want to filter on a given field but only on the other fields.…
NDepend CQL Count Query
I want to query a table of public methods of a specific class and a count of each methods usage in NDepend CQL. Currently query looks like this:
SELECT METHODS FROM TYPES
"AE.DataAccess.DBHelper" WHERE
IsPublic
Is it possible to aggregate queries in CQL?
Count image similarity on GPU [OpenGL/OcclusionQuery]
OpenGL. Let's say I've drawn one image and then the second one using XOR. Now I've got black buffer with non-black pixels somewhere, I've read that I can use shaders to count black [ rgb(0,0,0) ] pixels ON GPU?
I've also read that it has to do something with OcclusionQuery.
http://oss.sgi.com/…
< Previous Page Next Page >