Query about Queries
As a relatively new user to Sybase I am hoping someone can point me in the
right direction. We are getting ready to go live with our database and I am
wondering what types of queries I should be running for system performance
purposes. If anyone has any suggestions they would be more than appreciated.
Thanks in advance,
...How to Query A Query
I have been trying to build a crosstab report that reports everydate
within a selected range across the top and specific row information.
7/1 7/2 7/3 . . .
What I get as output is only the dates that contain information in the
rows. I can get the information I need by using a query within a query
Can a nested query be done in Informaker 5? What about version 6 or 7?
Thanks for your help
Convert your SQL to syntax, and you can write anything you want. So if your
DB support...Query a Query
I have a result set in a query.
Is it possible to query this query?
(no specific SQL dialect, can it be done generically?)
PETROS GAVRIELIDES wrote:
> I have a result set in a query.
> Is it possible to query this query?
> (no specific SQL dialect, can it be done generically?)
There is a generic answer to your question: Yes, there is a construct
called a sub-query that allows you, in 1 SQL statement, to query from a
But, generically speaking, not all DB engines support this construct.
For instance, Firebird only added it just over a y...How to query a query...
I'm working on converting an Access DB that I created into an ASP.NET application (and attempting to learn ASP at the same time...). One of my queries was very complex and required running a different query first, and then working off of that one. Any suggestions on the best way to do this in ASP?
The following is a sample of code I'm using so you can see the type of data-binding I'm using. Thanks for the help!
myConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " +"Data Source=" + Server.MapPath("/EquipmentCheckout.mdb"))
strS...Rogue queries, cancelling queries: some problems
The other day I wrote a really dump query in SQL Advantage that brought
11.5.1 (and the PC) to its knees, and I thought I should ask if this is
a known issue and/or if this indicates a misconfiguration. I've been
able to repeat this reliably.
The query was:
from d_si_ a,fgf_ttl b
group by a.Degree_Year
having a.AFIS_ID=b.AFIS_ID and b.Year=1997
Even as the query plan was being shown to me the system began to bog.
After 10 minutes I did query/cancel. Nothing happened for at least 15
minutes, during which time "Cancelling..." w...querying from open query join table
i am trying to query from a stored Procedure found from a remote server...and join the results with data found on a table another database.... my sql statment looked like that:
select col1,col2,..,local.colx from openquery(LSname,'exec storedproc') where openquery(LSname,'exec storedproc').colx=local.colx
i know it is wrong..please hel
OPENQUERY cannot be used to execute extended stored procedures on a
linked server. However, you can covert your stored procedure to function an extended by using a four-part name:select * from LSname.MYdataBase.dbo.M...? Joining two Queries
Right now I have two Queries that I've created:
What I'm wanting to do is graft everything from Query1 onto Query2 but only where Query1.UserID = Query2.UserID . Any suggestions on how I would go about doing this?
PC1.ModuleID = 369
MAX(PC2.CreatedDate) as CreatedDate
PC2.ModuleID = 369
-Tony Valenti...Joining two queries
Hello I have two queries that I would like help joining: Query #1SELECT UserName, (SELECT COUNT(*) AS Expr1 FROM Jokester WHERE (InvitedBy = aspnet_Users.UserName)) AS invsFROM aspnet_Users Query #2 SELECT UserName, SUM(Hits) AS HitsFROM (SELECT UserName, &nb...Problem with Oracle query
I have a problem with the following statement:
$dbh=3DDBI->connect( "dbi:Oracle:$db", "$user", "$pw") or die "Fehler
@tables=3D("eiche", "buche", "ahorn", "esche", "birke", "kiefer",
"kirschbaum", "merbau", "kempas", "nussbaum");
open(FILE, "<...Problem with Oracle queries
As a follwoup message - when I run a query against Orcale I have a
column that contains numbers but IM shows the number only on ever 11th
row and every thing in between is is either zero or garbage. I am using
the Oracle 2.5 ODBC driver and cannot find another driver within IM and
there are no downloads on the Powersoft site. Any help?
GIPSON & ASSOCIATES
Use the Oracle 2.0 ODBC driver. But better yet, use the native Oracle
driver that comes with IM. Do a custom install of IM and select from the
native drivers the desired Or...Query and Sub-Queries
I have a SELECT statement that has two sub queries in it. The 'where'
clause in the main query filters a TRADE_DATE field, for example: ......
where TRADE_DT >= '2003/01/01' and TRADE_DT <= '2003/01/31'.
Since I only have one date field(TRADE_DATE), I want the sub-query to query
where TRADE_DT <= '2003/01/31'. But its not working. I have to hard code
the '2003/01/31'. Now I know I can make a dynamic view in VB, but an ideas
of how I can do it in SQL? Here's my statement:
select T.BROKER_SEQ_NO,B.BROKER_NAME,B.B...Query Plan Query
We have a sql query that is causing a few issues in terms of
performance as the optimisor is choosing to table scan where
an index will certainly yield significant gains. As proven
when snapshotting the query and adding an index hint
Unfortunatley since the query is dynamically created by a
3rd party application, we are unable to influence this with
index hints and are dependant on the optimiser.
The table that is table scanning is partitioned (has also
hust been repartitioned to address a slight inbalance across
partitions) and has 7.6M records. It has been recently
r...Exacute query against query
I have a query which selects all dates from my database between 2 date values which is then entered into my dataset. I thin want to run through the dataset totalling the value of a certain column but only if dates match e.g.
27/02/2007 2.10 Tota...Query of Queried data
I am new to asp.net after working with coldfusion. I have created a datagrid from a query of a sql database. I am interested to know how can I create another datagrid which will process a query of the data in the original grid. So essentually it is a query of a query. Thank you
You want to filter on the result of the first query? The easiest way I can think of, is to put the data in a datatable, then use the select and dataview features of the datatable.
Hi,uusquintsYou can filter the datatable in the code-behind and bind the result to the 2nd datagird:...