Member Login
Search
Jump to a Date
Sponsored Communities
Cool stuff
Neat Stuff

Visit our shop for nerds in control lifestyle products.
Thermal Overload
The threads that wouldn't die...
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
Fortune
The full impact of parenthood doesn't hit you until you multiply the
number of your kids by 32 teeth.
number of your kids by 32 teeth.
RSS Feed
www.control.com/rss/
To get a personalized feed, become a member at no cost.
I am trying to create an Excel file using the "get external data" via MS Query to acquire plant data from a server running InSQL. The query works with most parameters except for the date. I've had no luck in trying to query between two dates, or even querying for an exact date. I think there may be some issues with the date format Excel uses versus InSQL. Has anyone run across this problem before? Thanks.
I used to build a SQL query in VBA. For example:
sqlstring = sqlstring & "SET wwEndDate '" & frmRange.txtDate & " 6:30am' "
where frmRange.txtDate is a date string in the form "mm-dd-yy"
After the the SQL query string is complete, I do:
"connstring = _
"ODBC;DSN=SQL;UID=wwUser;PWD=wwUser;APP=MicrosoftR Query;WSID=JAN
SKOWKA;DATABASE="
With ActiveSheet.QueryTables.Add(Connection:=connstring, _
Destination:=Sheets(2).Range("C10"), Sql:=sqlstring)
.Refresh
End With"
Regards,
Piotr Kowalski
sqlstring = sqlstring & "SET wwEndDate '" & frmRange.txtDate & " 6:30am' "
where frmRange.txtDate is a date string in the form "mm-dd-yy"
After the the SQL query string is complete, I do:
"connstring = _
"ODBC;DSN=SQL;UID=wwUser;PWD=wwUser;APP=MicrosoftR Query;WSID=JAN
SKOWKA;DATABASE="
With ActiveSheet.QueryTables.Add(Connection:=connstring, _
Destination:=Sheets(2).Range("C10"), Sql:=sqlstring)
.Refresh
End With"
Regards,
Piotr Kowalski
I have a cell(a1) as 12/01/2007 to be used as a paramter in sqlsgtring. Can you please let me know how it shoud be written??
Thanks,
ragup
Thanks,
ragup
From Control Engineering magazine...
Related articles from Control
Engineering magazine- Rockwell Automation introduces virtual design and production software utility
- FactoryTalk industry-specific applications launched
- Rockwell Automation releases VantagePoint for plant data visualization
- 14 new high-performance USB data acquisition devices
- New cyber security blog tackles DCS, SCADA vulnerabilities
- Analyzing Critical Flow Measurements
- Get the Most HMI for the Dollar
- Panel meter applications: 3-in. 2U three color touch modules
Above articles copyright 2008 Reed Business Information.
Subject to its Terms of Use.
Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2008 Control Technology Corporation. All rights reserved.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Patronize our advertisers!




