SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Help

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Help
Author Message
mlr0911



Joined: 13 Jul 2007
Posts: 35
Country: United States

Post Help Reply with quote
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.

Code:
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7951

Post Reply with quote
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 View user's profile Send private message
mlr0911



Joined: 13 Jul 2007
Posts: 35
Country: United States

Post Reply with quote
In SQL i see the following

Account Number (this is the header)
12345678 (this is the data)
Wed Aug 08, 2007 4:16 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7951

Post Reply with quote
In case if you are exporting the results to a file and whant "Account Number" appear in the first line, use this query

Code:

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 View user's profile Send private message
mlr0911



Joined: 13 Jul 2007
Posts: 35
Country: United States

Post Reply with quote
OK, I'll try that.
Wed Aug 08, 2007 4:17 pm View user's profile Send private message
mlr0911



Joined: 13 Jul 2007
Posts: 35
Country: United States

Post Reply with quote
When I add the "Union All" statement in my SQL, it gives me an error.

Here is the error:

Quote:
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7951

Post Reply with quote
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 View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.