Plase, help on Crosstab SQL

hi everyone, please i need some help on project i'm working with
i don't know if this a the right category to post this question, if i'm wrong please move this to the right one. thank you

i have 2 query that do a crosstab query those query results are like this
i'm currently using a _msaccess_ database, any suggestion is accepted, even if it's not a msaccess sql i might can find a similar command in msaccess
or...if you can give me a delphi code based solution

*QIn*
*SSN  |  3  |  5  |  6  |  8*

*QOut*
*SSN  |   2  |  5  |  6  |  7*

when i join those tables, it will result like this
*QIn.SSN  |  3  |  QIn.5  |  QIn.6  |  8  |  QOut.SSN  |  2  |  QOut.5  |  QOut.6  |  7*

as you can see, i cannot differ which the 3, 8, 2, 7 is from which query
those numbers are from a _crosstab query (transform msaccess) so you can't tell what will shows up there_

is any sql command that can make all the fields in joined table shows the name of the original table like
*QIn.SSN  |  QIn.3  |  QIn.5  |  QIn.6  |  QIn.8  |  QOut.SSN  |  QOut.2  |  QOut.5  |  QOut.6  |  QOut.7*
even when there is only one field with that name (no duplicate field name)

this is so hard for me to explain, hope you can understand.

any solution is appreciated

*thank you*
0
Conan
10/10/2014 8:53:24 AM
embarcadero.delphi.ado 597 articles. 1 followers. Follow

6 Replies
526 Views

Similar Articles

[PageSpeed] 56

nobody? anybody?

> {quote:title=Conan Edo wrote:}{quote}
> hi everyone, please i need some help on project i'm working with
> i don't know if this a the right category to post this question, if i'm wrong please move this to the right one. thank you
> 
> i have 2 query that do a crosstab query those query results are like this
> i'm currently using a _msaccess_ database, any suggestion is accepted, even if it's not a msaccess sql i might can find a similar command in msaccess
> or...if you can give me a delphi code based solution
> 
> *QIn*
> *SSN  |  3  |  5  |  6  |  8*
> 
> *QOut*
> *SSN  |   2  |  5  |  6  |  7*
> 
> when i join those tables, it will result like this
> *QIn.SSN  |  3  |  QIn.5  |  QIn.6  |  8  |  QOut.SSN  |  2  |  QOut.5  |  QOut.6  |  7*
> 
> as you can see, i cannot differ which the 3, 8, 2, 7 is from which query
> those numbers are from a _crosstab query (transform msaccess) so you can't tell what will shows up there_
> 
> is any sql command that can make all the fields in joined table shows the name of the original table like
> *QIn.SSN  |  QIn.3  |  QIn.5  |  QIn.6  |  QIn.8  |  QOut.SSN  |  QOut.2  |  QOut.5  |  QOut.6  |  QOut.7*
> even when there is only one field with that name (no duplicate field name)
> 
> this is so hard for me to explain, hope you can understand.
> 
> any solution is appreciated
> 
> *thank you*
0
Conan
10/13/2014 3:20:27 AM
Cant you name (as) your fields in the query yourself?

Select 7 as QOut7 from Tablename
0
Robert
10/13/2014 6:01:08 PM
no, because the field generated automatically by the crosstab query

any other solution

thanks

> {quote:title=Robert Triest wrote:}{quote}
> Cant you name (as) your fields in the query yourself?
> 
> Select 7 as QOut7 from Tablename
0
Conan
10/14/2014 1:15:53 AM
Maybe you can show your query. I think there are not a lot of people doing Crosstab queries here.
I never did and my way would be to do just a normal query, analyse/collect the output, put the data
in a (object) list and display it as the use wants it in a StringGrid.
0
Robert
10/14/2014 2:59:32 PM
thank you, but i already found the solution
i just find the index of the gap between the table

thank you for trying to help :D

> {quote:title=Robert Triest wrote:}{quote}
> Maybe you can show your query. I think there are not a lot of people doing Crosstab queries here.
> I never did and my way would be to do just a normal query, analyse/collect the output, put the data
> in a (object) list and display it as the use wants it in a StringGrid.
0
Conan
10/15/2014 2:35:42 AM
thank you for trying to help :D

> {quote:title=Robert Triest wrote:}{quote}
> Maybe you can show your query. I think there are not a lot of people doing Crosstab queries here.
> I never did and my way would be to do just a normal query, analyse/collect the output, put the data
> in a (object) list and display it as the use wants it in a StringGrid.
0
Conan
10/15/2014 3:18:37 AM
Reply:

Similar Artilces:

HELP!HELP!HELP!HELP!HELP!HELP!
I was using powerbuilder4.0 a month ago I decided that migrate it to PB7.0 When Im using 4.0, in datawindows I was using extra colums additional to stores procedure. I mean that for example; stored proc. returns 4 columns. I was using 2 extra columns to modify something from client. But I cant do the same thing in PB7.0. How can I do that??? please help. Gurcan yucel gyucel@infina.com.tr "I was using 2 extra columns to modify something from client." what does this mean that you added to the result set? If so then just goto the SQL and add a param. Then set the...

Help Help Help Help Help Help
------=_NextPart_000_0074_01C2960E.EBE13A30 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Can someone please help me. I have installed mysql on Unix Solaris and it works fine I have Perl installed previously which is working and with which i have installed other perlmodules before and are working fine. I have also installed DBI and it works fine with the Sybase drivers which i have installed. When i tried to install the Msql-Mysql-modules-1.2219 drivers i get the following error. # make /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/...

SQL Inserting into a database HELP HELP HELP!!!
Hi, I'm having problems inserting data into a database, When inserting i get the following error. System.Data.SqlClient.SqlException: Invalid object name 'Calendar' Calendar is the name of the table, It has full write permissions for my user. I can select from it and bind to a datagrid to render on the page, but i cant update/insert. many many thanks for any genius who can help... Any clues...? CODE BELOW ---------------- <%@ Page Language="VB" %> <%@ Import NameSpace="System.Data" %> <%@ Import NameSpace=&q...

Help Help Help Help
i need to create a crosstab report using Crystal reprot for VS 2003 i face aproblem when i need to order my Fileds by their names my data must be like this Basic Cola Housing Gross Deduction1 Deduction2 Deduction3 Net but when i run my report it give my a not sorted data acutally i have acode field which can i order field using it. but i don't knwo how to do thisSo..................? Select Report tab | |-->Select Record Sort expert Choost the fields you want to sort --Select the corresponding sort direction f...

Delphi, ADO, SQL Anywhere
This combination seem not to work together. I'm using D5 Enterprise, ASA 6.03 w/latest EBF On some tables it works. But most of the tables produce a message "An Error occured". As soon as data bound contols are used, the connection just gives errors. It seem to work fine, if I use client based cursors. But this option copys the server table to the local client. This is not acceptable for my large tables. It lasts several minutes on my pc. Are there plans to release a native OLE DB provider for ASA or at least to fix the ODBC driver so, that ADO can be used? I am very...

help help help help
Name: chef mario Email: chefusa_at_pacbell.net Product: Firefox Summary: help help help help Comments: Heard great reports about Firefox!!! Downloaded & installed Firefox !!!! Lost All my very very valuable BOOKMARKS!!! CAN ANYONE HELP!!!!! All bookmarks were in Internet Explorer Did bookmark transfer to Firefox. Seem the Fox eat all m,y bookmarks Need serious help anyone. chef mario Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051025 Firefox/1.5 ...

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

HELP HELP HELP SQL SERVER 6.5
I'm using PB 6.0 and sql server 6.5 In a DW, i have an edit mask Column with the format 'dd/mm/yyyy', when i'm using it in query mode, my argument is '18/12/1999' ( French date), but when i get the SQL Syntax, i have '12-18-1999 .....' WHY ??????????????? Is there a solution to force the DW to keep the original value ? Thank's Because you system date format is MM-DD-YYYY. The value is correct. You can change system date format in control panel. shihong Steph wrote in message <8zRKxg8b#GA.254@forums.powersoft.com>... >...

Help with ADO connectivity in Delphi XE
The company I work for has finally started migrating applications from Delphi 5 and 7 to Delphi XE and XE2. But, I am having a problem with a TADOConnection. A simple application built in D5 to connect to a MS SQL database works. But the same code compiled in Delphi XE will not connect. When the user's role changes from User to Power User, they can connect to the database in the app compiled in XE. The workstation that the user is running from is Windows XP. The SQL Server version is 2005. MDAC version 2.8 Unfortunately, we have been unable to simulate their environment, an...

Help, Help, Help Transact-SQL outer join restrictions
Dear all, Please help. After upgrading my ASA5.5 to ASA7.03, the reports using below syntax would return no data from ASA7.03 but 32 rows from ASA5.5. We know the problem from the "Transact-SQL outer join restrictions"( e.g *= ) but the ASA7.03 help file do not contain enough material for me to understand and change the syntax. Do everyone can help me or give a direction to solve below syntax? Once below solved, my other reports (more than 50) also can be solved. Thanks a lot. Frankie +++++++++++++++++++++++++++++++++++++++++++++++ SELECT DISTINCT &qu...

help... help... help....??????
I have this datatable , and i binded it to a datagrid with check box for delete ,but i have a problem with delete code for the datagrid : 'this is the datatable Sub cart() Dim objDT As DataTable Dim objDR As DataRow objDT = New System.Data.DataTable() objDT.Columns.Add("ProductID") objDT.Columns.Add("name") objDT.Columns.Add("cost") objDT.Columns.Add("quantity") ' objDT.Columns.Add("check") 'first row objDR = objDT.NewRow() ...

Help, help help
This is a multipart message in MIME format. --=_alternative 005C87C886257037_= Content-Type: text/plain; charset="US-ASCII" I did a Mysqldump for backing up and how I got this error. Anyone know why? Software error: DBD::mysql::st execute failed: Unknown column 'mimetype' in 'field list' [for Statement " SELECT attach_id, DATE_FORMAT(creation_ts, '%Y.%m.%d %H:%i'), mimetype, description, ispatch, isobsolete, isprivate, submitter_id, LENGTH(thedata) FROM attachments WHERE bug_id = 41 OR...

help help help
i wanna know the list of compite time errors related to code correction/programming errors in powerbuilder.thanks lot cenk That's a pretty big request. You want a list of everything it is possible to do wrong in PowerBuilder? What you might want to do is search the solved cases infobase on the Sybase web site. On Tue, 15 Jun 1999 11:50:32 +0300, in powersoft.public.powerbuilder.general cenk KIZILDAG <cenk1536@yahoo.com> wrote: >i wanna know the list of compite time errors related to code >correction/programming errors in powerbuilder.thanks lot > >c...

Help! Help! Help
Help! I am using the HttWebRequest classrooms and HttWebResponse and when I execute my application for the second time of the this error: A potentially dangerous Request.Form value was detected from the client (TextBox1="<!DOCTYPE HTML PUBLI..."). this is my codes: Dim req As System.Net.HttpWebRequest Dim res As System.Net.HttpWebResponse Dim sr As System.IO.StreamReader Dim s As System.IO.Stream Dim b As Byte() req = System.Net.WebRequest.Create("http://www.page.com") b = ...

Web resources about - Plase, help on Crosstab SQL - embarcadero.delphi.ado

Inside the crosstabs: Why Republicans don't support a minimum-wage hike
Democrats are vowing to make the minimum wage a midterm issue and will start by making a push to raise it once Congress is back in session this ...

Crosstabs
Kyle Leighton looks at the effect Mitt Romney's 47% remarks had on the polls. Full size version....

Updated with crosstabs: Dead heat in the 23rd
With two weeks left in the special election for the 23rd Congressional seat, Democrat Bill Owens has turned a seven-point deficit into a four-point ...

Beware the Crosstabs! Part the Second - Ten Miles Square - The Washington Monthly
Last week I took someone to task for placing too much weight on Gallup’s reports of Latino voters supposedly disproportionate turn away from ...

David Goldstein (@GoldyHA) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Incarceration in the United States - Wikipedia, the free encyclopedia
A graph showing the incarceration rate under state and federal jurisdiction per 100,000 population 1925-2008. Does not include prisoners held ...

Questions - Bill Clinton and Bush Tax Cuts - June 7-8, 2012 - Rasmussen Reports™
Rasmussen Reports - The best place to look for polls that are spot on

Market Data - ABI Research
technology market intelligence About About Us Management & Advisory Board Analysts Worldwide Locations Sourcing Guidelines Privacy Policy Research ...

One day later, pro-transportation tax forces say their side is winning
On Monday, Channel 2 Action News released an automated poll that put metro Atlanta support for a transportation sales tax at 42 percent – with ...

Why Gingrich is on top
A poll released today by Public Policy Polling shows former House Speaker Newt Gingrich capping off an amazing month’s rise by taking the lead ...

Resources last updated: 12/29/2015 10:24:36 AM