HomeForum
Welcome, Guest

SQL Queries
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: SQL Queries

SQL Queries 5 years, 9 months ago #138

  • kriviere
  • OFFLINE
  • Junior Boarder
  • Posts: 31
  • Karma: 0
Is it possible to do multiple sql statements within a single SQL Script object, export, or Data Lookup? I'm trying to put together something to check record counts across dozens of tables and having to create dozens of objects, one for each table, is a daunting prospect for such a repetitive and simple operation. Further, is there a way to get the results written to a file, especially multiple results written to a single file? Maybe I'm not using the appropriate tool for what I'm attempting to do.

RE: SQL Queries 5 years, 9 months ago #139

  • mike8888
  • OFFLINE
  • Expert Boarder
  • Posts: 131
  • Karma: 0
Posted: Mon Jul 31 2006, 07:18PM
Is it possible to do multiple sql statements within a single SQL Script object, export, or Data Lookup?
SQL Script object
Yes it is possible.
export and Data Lookup it is not
but you can use select statement with union
select * from table1
union all
select * from table2

Further, is there a way to get the results written to a file, especially multiple results written to a single file?

It is not possible to do at the moment but we will add this option to the future release.
it will take approximately one week to do

RE: SQL Queries 5 years, 9 months ago #140

  • kriviere
  • OFFLINE
  • Junior Boarder
  • Posts: 31
  • Karma: 0
That has given me just what I needed! Thanks. In fact, by selecting a constant string along with the count I can see the names of the tables as well this way:

select 'table1', count(*) from table1
union
select 'table2', count(*) from table2


As I've been working on getting the export sql to include the multiple union statments I notice that when I'm editing the text box, the program interprets the Enter key as meaning I've pressed the OK key and closes the properties window of the export. This makes editing it to include a long series of union statements somewhat awkward. Is this something that could be done differently in a future release? I'm running 7.2.4. I see that 7.2.5 is the current version, where can I see a revision history to see if the changes are worth going through the upgrade for.

RE: SQL Queries 5 years, 9 months ago #143

  • mike8888
  • OFFLINE
  • Expert Boarder
  • Posts: 131
  • Karma: 0
Can you try to type ctrl+enter istead

RE: SQL Queries 5 years, 9 months ago #147

  • mike8888
  • OFFLINE
  • Expert Boarder
  • Posts: 131
  • Karma: 0
Kenneth

Please Download version 7.2.7
It is now possible to write multiple results into one export file

Mike

RE: SQL Queries 5 years, 9 months ago #148

  • kriviere
  • OFFLINE
  • Junior Boarder
  • Posts: 31
  • Karma: 0
>Can you try to type ctrl+enter istead

OK, I've tried ctrl+enter and that has no effect. It doesn't insert a newline. it doesn't act as though I'd hit the OK button as just plain enter does. Nothing. Haven't gotten 7.2.7 yet, though. I'll give that a try.

UPDATE: OK, I've now upgraded 7.2.7 and enter works nicely, adding a new line without being interpreted as clicking on the OK button.
  • Page:
  • 1
Time to create page: 0.22 seconds

Testimonials

One of the good things about Advanced ETL Processor that the trial has no limitations. There is no need to fill in any registration forms or to buy the software in advance.  That saved us a lot of time and we were able to load and  validate all our data when we needed it urgently.

John Parker.

User Login

You only need to log in or register to use our support forum



Our customers

BP

BBC

HSBC


Databases we work with

Go to top