Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default sql that will refer to a cell in excel

How can I write a sql statement that will refer to a cell in excel.
I would like to do a date range like =<"B2" and ="B3"
and a parameter =<"C2" and ="C3"

You get my point...

I didn't want to write the statement in excel, because excel is slow pulling
data from a huge data base (up to a minute) using several tables, where if I
write the sql directly to the data base it returns data in just a few
seconds. But then I can't use excels convenient parameters
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default sql that will refer to a cell in excel

Assuming this in VBA:
Dim SQLString as string
SQLString="SELECT * FROM YourTable WHERE IssueDate <= #" & Range("B2").Value
& "# AND IssueDate = #" & Range("B3").Value & "#"

The exact syntax will depend on the database provider/engine etc you are
using, but something like that.

NickHK

"zero6060" wrote in message
...
How can I write a sql statement that will refer to a cell in excel.
I would like to do a date range like =<"B2" and ="B3"
and a parameter =<"C2" and ="C3"

You get my point...

I didn't want to write the statement in excel, because excel is slow

pulling
data from a huge data base (up to a minute) using several tables, where if

I
write the sql directly to the data base it returns data in just a few
seconds. But then I can't use excels convenient parameters



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I to refer to a (named) cell in Excel header/footer? Ton[_2_] Excel Worksheet Functions 1 December 16th 08 11:20 AM
how to refer the cell insteat of Getpivotdata in excel 2003? David Excel Discussion (Misc queries) 1 November 21st 06 07:53 PM
Excel: can I refer to cell reference in page setup header nikos Excel Worksheet Functions 0 February 21st 06 06:23 PM
How do I refer to the tab name in a cell formula in Excel? Steven Reames Excel Discussion (Misc queries) 1 August 3rd 05 07:22 PM
When writing a macro in excel workbook, how do I refer to ea cell Diana Bartz Excel Programming 1 July 7th 05 09:51 PM


All times are GMT +1. The time now is 05:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"