dbTalk Databases Forums  

Microsoft Query question.

comp.databases.pick comp.databases.pick


Discuss Microsoft Query question. in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Joe
 
Posts: n/a

Default Microsoft Query question. - 06-02-2011 , 01:21 PM






I have a MS SQL database, with multiple tables (over 200) that I am pullinginto a standardized Excel format, for other processing.

The concept is working well but I dread setting this up over 200 times.
The first cell A1 in the spreadsheet (not part of the query, along with thefirst 7 rows) will always have the SQL table name I would want.

I was hoping to find a way that instead of:
"SELECT DXXX1_SQD.ID, DXXX1_SQD.F2, DXXX1_SQD.F3, DXXX1_SQD.F4, DXXX1_SQD.F5, DXXX1_SQD.F6, DXXX1_SQD.F7, DXXX1_SQD.F8, DXXX1_SQD.F9, DXXX1_SQD.F10, DXXX1_SQD.F11, DXXX1_SQD.F12, DXXX1_SQD.F13, DXXX1_SQD.F14, DXXX1_SQD.F15, DXXX1_SQD.F16, DXXX1_SQD.F17, DXXX1_SQD.F18, DXXX1_SQD.F19, DXXX1_SQD.F20, DXXX1_SQD.F21, DXXX1_SQD.F22, DXXX1_SQD.F23, DXXX1_SQD.F24, DXXX1_SQD.F25, DXXX1_SQD.F26, DXXX1_SQD.F27, DXXX1_SQD.F28, DXXX1_SQD.F29, DXXX1_SQD.F30, DXXX1_SQD.F31, DXXX1_SQD.F32, DXXX1_SQD.F33, DXXX1_SQD.F34
FROM OPS.dbo.DXXX1_SQD DXXX1_SQD
ORDER BY DXXX1_SQD.ID"

I could 'pull' from the worksheet in a manner like this:
"SELECT [A1].ID, [A1].F2, [A1].F3, [A1].F4, [A1].F5, [A1].F6, [A1].F7, [A1]..F8, [A1].F9, [A1].F10, [A1].F11, [A1].F12, [A1].F13, [A1].F14, [A1].F15, [A1].F16, [A1].F17, [A1].F18, [A1].F19, [A1].F20, [A1].F21, [A1].F22, [A1].F23, [A1].F24, [A1].F25, [A1].F26, [A1].F27, [A1].F28, [A1].F29, [A1].F30, [A1].F31, [A1].F32, [A1].F33, [A1].F34
FROM OPS.dbo.[A1] [A1]
ORDER BY [A1].ID"

Is there any way to reference the content of a cell, in Microsoft Query?
Or any other suggestions to best deal with this?

Reply With Quote
  #2  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: Microsoft Query question. - 06-02-2011 , 03:10 PM






Joe wrote:

Quote:
I have a MS SQL database...
... any other suggestions to best deal with this?
Yeah, post this in a forum where SQL people hang out. You're not in
the right forum for this kind of question.

Good luck.

Reply With Quote
  #3  
Old   
Joe
 
Posts: n/a

Default Re: Microsoft Query question. - 06-03-2011 , 07:39 AM



So a SQL question is not expected in a SQL forum?

Should I try a healthy lifestyle forum?

Reply With Quote
  #4  
Old   
Steve Douglas
 
Posts: n/a

Default Re: Microsoft Query question. - 06-03-2011 , 08:40 AM



No, I think Tony was just letting you know that this is in fact NOT an SQL forum. It is habitated by "pick" database (and its derivatives) types.

Good Luck,
Steve

Reply With Quote
  #5  
Old   
Excalibur21
 
Posts: n/a

Default Re: Microsoft Query question. - 06-04-2011 , 09:39 PM



On Jun 3, 10:39*pm, Joe <tm_tec... (AT) yahoo (DOT) com> wrote:
Quote:
So a SQL question is not expected in a SQL forum?

Should I try a healthy lifestyle forum?
Perhaps you should get a Pick database then you would not need to do
this sort of rubbish. Try TigerLogic, Intersystems, Rocket U2,
Northgate Reality, Revelation, OpenQM millions of users with decent
reporting and exporting facilities.
Peter McMurray

Reply With Quote
  #6  
Old   
Frank Winans
 
Posts: n/a

Default Re: Microsoft Query question. - 06-05-2011 , 12:10 AM



"Steve Douglas" wrote
Quote:
No, I think Tony was just letting you know that this is
in fact NOT an SQL forum. It is habitated by "pick"
database (and its derivatives) types.

Good Luck,
Steve
Or stick around cdp but discuss how to use Pick to generate
your nastily-complicated spreadsheets / sql / whatever.
-- If that's even possible.

Reply With Quote
  #7  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: Microsoft Query question. - 06-05-2011 , 04:44 PM



"Frank Winans" wrote:
Quote:
Or stick around cdp but discuss how to use Pick to generate
your nastily-complicated spreadsheets / sql / whatever.
-- If that's even possible.
Of course "nastily-complicated spreadsheets" are possible, generated
from MV or integrated with MV at runtime. Present a need and a
solution can be described. Whether it's free or for fee depends on
the details. Google CDP or the web for NebulaXLite or NebulaXChange
for examples.

T

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.