 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
mlr0911
Joined: 13 Jul 2007 Posts: 35 Country: United States |
|
Help |
|
I have been working with this query but it isnt returning the header rows for me. I can't understand it. Here is a simple SQL that I am running........it returns the acct number, however, it doesn't return the header "Account Number". I posted this before but I can't seem to get this to work.....Any more insight would greatly be appreciated.
 |
 |
Dim MySql,string
set MySql,"SELECT AC_BI.aCCOUNT_NUMBER FROM AC_BI WHERE (AC_BI.ACCOUNT_NUMBER='10640003')"
|
thanks in advance
|
|
Wed Aug 08, 2007 3:48 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7951
|
|
|
|
Where do you expect to see the header "Account Number", which by the way is not a data record?
|
|
Wed Aug 08, 2007 4:13 pm |
|
 |
mlr0911
Joined: 13 Jul 2007 Posts: 35 Country: United States |
|
|
|
In SQL i see the following
Account Number (this is the header)
12345678 (this is the data)
|
|
Wed Aug 08, 2007 4:16 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7951
|
|
|
|
In case if you are exporting the results to a file and whant "Account Number" appear in the first line, use this query
 |
 |
Dim MySql,string
set MySql,"SELECT 'Account Number' UNION ALL SELECT AC_BI.aCCOUNT_NUMBER FROM AC_BI WHERE (AC_BI.ACCOUNT_NUMBER='10640003')" |
Last edited by SysOp on Wed Aug 08, 2007 4:18 pm; edited 1 time in total |
|
Wed Aug 08, 2007 4:16 pm |
|
 |
mlr0911
Joined: 13 Jul 2007 Posts: 35 Country: United States |
|
|
|
OK, I'll try that.
|
|
Wed Aug 08, 2007 4:17 pm |
|
 |
mlr0911
Joined: 13 Jul 2007 Posts: 35 Country: United States |
|
|
|
When I add the "Union All" statement in my SQL, it gives me an error.
Here is the error:
 |
 |
An error occurred while executing automation script.
line 26:SQLSTATE=37000
[cache odbc][State: 3700][Native Code 1]
[SQL Code: <1>: <Invalid>] |
Is this because I am working in a cache database?
|
|
Wed Aug 08, 2007 4:29 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7951
|
|
|
|
I thought you are doing MySQL. I'm not familiar with Cache. Please check with your database manual what's the right syntax for the UNION operator.
|
|
Wed Aug 08, 2007 5:05 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|