ODBC Connections - First Basic Query with Excel

ODBC Connections - First Basic Query with Excel


In this session, Peter discusses the basics of creating queries in Excel using the PBS Accounts Payable Vendor file. Now don't be fooled, though it's a basic query, he goes into quite a bit of detail on what's going on "behind the curtain". It really sets the table to help you understand how the whole ODBC link works whether you're attaching to a SQL database, or one with an ODBC driver.
Closed Caption:

now as a first example and I'm you can
see here on my list of examples I'm just
basically going to walk through the
samples and comment on them as we get to
them the first sample here is is the
vendor file is a simple dinner file look
up and what it's doing is we're looking
at the the connection between the excel
spreadsheet in Excel spreadsheet and the
backend vendor database you can see it's
a it's a it's a regular spreadsheet and
i can show you that you know the fields
are coming in the way you expect so this
is a date field so i can add 90 days to
that date field and then copy it to the
various columns down here that sort of
thing that works
these are number field so I can take
this and come over here into an auto sum
and hit bang and enter and I've got a
total so we're dealing with a real
spreadsheet the difference here is that
all of these numbers are being pulled
out by what amounts to a sequel query
being issued to the PBS database and
that PBS databases responding by filling
the fields and giving us these numbers
back now the heart of the system comes
up here under data I I'm going two
thousand office 2007 it's very very
similar in office 2010 and somewhat
different in earlier versions of office
the features are all there but they're
just rearranged differently obviously
for those of you who haven't yet gone
getting used to the the famous ribbon
under 2007 up they've actually improved
this portion of the interface vastly and
all you need to do is pick up
connections and we have one connection
here and I go into properties and look
at the definition and that definition
tells me we're on getting the data it's
the sequel link which I will show you in
just a moment and then it shows me the
sequel statement and we'll come back to
that in a big way in a few minutes and
that's the actual sequel statement
that's being issued to the PBS back-end
to extract the data
there's a better not a better way a
different way of looking at that I can
actually look at the query in a kind of
a more graphical fashion so if i click
on edit query and I just come next pick
off the next here and look at the query
and Microsoft query this is the nature
of our query as set up by this this sub
function within Excel what's happening
here in and just a word of caution or
just a word to the wise not all excel
installations include the microsoft
query application it's something that's
free
it's only excel distribution discs but
sometimes people don't install them
this is a requirement for using either
sequel odbc simply because this is the
thing that formulates from the graphical
representation from your drag and drop
which will be looking at it from that it
actually formulates the sequel
statements and what i've done here is
i've requested their name number
city-state balance and first purchase
date I've requested those from this list
of fields that are in the vendor file
and so i can add others for instance
I've got a steady city state and zip I
could address one for example here and
then if i refresh i'm going to pick up
all my address once so this is really a
nice quick easy drag-and-drop kind of
environment i'm gonna get rid of this
because I don't really want it for my my
purposes but and then when I'm done with
the query what happens is it then
returns this data to Microsoft Excel and
we have this data that's been refreshed
or we can simply click refresh all up
here and it will up the data now this is
not a one-time thing when I save this
spreadsheet what i'm doing is i'm i'm
saving this as an xml file not annex
LS X so it's giving me some some
warnings here I'm but when I save this
file
I'm not only saving the current data
that you see right here including the
data I'd added i'm also saving all of
these parameters that we saw up here
that related to making the connection
and so what's going to happen is every
time I open the spreadsheet i can click
refresh and get the latest data so for a
real quick example I here i have a
pretty much a garbage vendor down here
if I bring that vendor up in PBS let me
just log into my sequel PBS equal bring
it up vendors sort by number down at the
end there
double-click this i'm going to just
change the name
the quick brown fox . save that now
that's written that back to sequel
I don't have to do anything else at this
point is written back to sequel so I
come back to here we see the original
junk in there we now click refresh all
once it's done
the quick brown fox so this tube is not
only established by this process it
maintained so that when i say this
database every time it comes up it has
the original data but i can also click
refresh all so that's that the kind of
take away i want to do from this first
simple example the one other thing i
want to talk about I want to talk about
uh we're a couple of the components are
and and how they work and then we'll be
on into some more examples so many
minutes and let me finish off with this
i think we can actually get rid of this
but I'll just minimize it
let's look at XD bc first in in here in
my course copy of version 12 0 and the
course what we have here is a folder
when we install the XD bc we end up with
a folder and basically this combination
of folders with files in them
corresponds to the data dictionary these
are the definitions of the fields in the
the case of sequel this is built into
the sequel schema so that there isn't a
special place but there is sequel out
there and so if we go out if we were to
go out and look at my sequel database we
would find out here let's go into here
program files and part of what i'm
trying to do here is also to take out
the mystery of out of this under
microsoft's equal ms 10ms equal here's
my stuff and you end and a variety of
backups and the data files themselves
and so on and so forth so we've got
these files jeans some of these were
updated this is the actual database
itself was updated today as well as we
did updates and so on and so forth so
this is where the sequel data is held
everybody knows where the PBS date is
held so the combination of the data
dictionaries and where the data is where
the sequel data is where the PBS data is
where the data dictionaries are for
sequel where the data dictionaries are
for the XD see the combination of those
two pieces is held in one spot which is
the data source name and that data
source name you can get at by running
settings control panel administrative
tools and odbc windows seven it slightly
differently arranged but it's the same
concept now for your most of your
clients you're just going to have one or
two obviously being in development here
and doing a lot of testing I've got a
lot of stuff out here
someone call it crap but it's my stuff
here is our sequel link and here is our
course data link we configured look at
the configuration for the XD bc it tells
us where are the dictionaries are and
actually it's a simple file that point
to where our date dictionaries are and
where our files are and by the way for
those of you who have not used this
before with any version any recent
version you want to change the maximum
columns to 512 it defaults to 256
because that used to be the excel
maximum but with the new version 7 excel
they've they've expanded the number of
columns and it turns out we have a
number of files things like the payroll
history that have substantially more
than 256 fields in them so that this
number needs to be opted to the next
limit up there which is 512 so that's
the XD set up the sequel setup because
it's kind of all stuck together with the
sequel database itself is rather more
simple and basically we look at what's
the name of our link and put in a
description and then this is the
instance name for those of you are
familiar with sequel this is the
instance name and uh there are
additional there are additional
parameters typically not touched in
behind us which we can go after but up
the default here is the PBS data and
that will have been set up when we
installed our sequel so there's really
not an awful lot out there but the
fundamental concept here that I want to
make come home is the fact that both the
XD bc and the sequel use this odbc
administrator this this connection
administrator to point to where the data
is so that you have a single name a
single name which tells the program all
the technical details from making the
connection it's like having the gps and
punching in favorites go home
you don't need to do anything after that
it sets everything up and director hole
that's that's the data source name now
just coming back to our spreadsheet we
were looking at the connection data
under data connections if we look at the
properties on the definition sheet of
the properties
here is that dataset name and this is
more the information because my second
point to the wise kind of point here is
if you doing development work whether
it's in access or Excel or crystal
almost inevitably the data source name
that you will be using on your machine
will be different from the data source
name on your client machine that's just
in the nature of it they're probably
going to call it PBS or PBS p12 or
something where you you like me you may
have a dozen or two dozen different
setups for different clients and so on
and so forth and you have to keep them
straight
well this should not be in any respect a
hindrance because for example here in
Excel lease when we take this particular
spreadsheet to the client
all we have to do is having set up the
deep the DSN at the client we come into
these connection properties and change
this thing that's it and we're cool
so the point here is within the cavity
at that you will have to change one two
parameters in these connection
properties and they're similar things
and access and crystal within that cavi
at then you can develop on your machine
and take these over and simply rename
the data source name and basically
you're away

Video Length: 12:53
Uploaded By: Passport Software, Inc.
View Count: 40,380

Related Software Products
Excel Tool SQL Query
Excel Tool SQL Query

Published By:
Excel-Tool

Description:
The software is a add-in for Excel that allows you to query using SQL within the Excel application itself. It can run a SQL Query on an Excel Spreadsheet. You may use the SQL statement every day to search the data in ACCESS, and then import the data in ACCESS to EXCEL, handwriting SQL sentences searching is both time-wasting and it's a hard sledding, also it is easy to get wrong, this software can solve the listed problems. It allows you to create SQL queries by clicking and arranging visual ...


Related Videos
Excel to SQL
Excel to SQL

Excel to SQL http://www.sql-excel.com One of the things that I see IT software development people struggle with is SQL to Excel integration. SQL to Excel integration unfortunately has been made unnecessarily cumbersome because of the rather primitive awkward way Microsoft has chosen to implement SQL to Excel communication. That's why I created a way to solve SQL to Excel integration once and for all. It doesn't have to be hard. It doesn't have ...
Video Length: 12:12
Uploaded By: exceltosql
View Count: 254,743

Data Analysis using Excel- Database Queries, Filters and Pivot Tables
Data Analysis using Excel- Database Queries, Filters and Pivot Tables

I have noticed that many people throughout the world have been interested in my training videos on Using Database Queries and Pivot Tables in Microsoft Excel. So this training video, while very helpful for Active Planner customers, is applicable to any Excel user who wants to create database queries and then analyze that data using Filters and Pivot Tables. And as an added bonus, we will go into SQL Management Studio to build and debug our query and I will show you how to create a PIVOT query. ...
Video Length: 54:54
Uploaded By: ActivePlanner
View Count: 148,877

How to config Excel for SQL queries
How to config Excel for SQL queries

Sorry for the lack of audio, this was intended as a personal reference for myself and my team who were present for the demonstration. I'll create another, better one in the future. For migration of data from PSFT to SFDC, we need to extract data from SQL Server in a CSV format. Then use Dataloader to import/upsert data to Salesforce. CSV files are not the best solution, but here is an easy way to get data into Excel so that you can Save As.. a csv ...
Video Length: 05:51
Uploaded By: Jon Lal
View Count: 51,189

Beyond Excel: Parameterized Query
Beyond Excel: Parameterized Query

Create a Parameterized Query in Excel without Add-ins, Macros, or Formulas hr / bClosed Caption:/b yeah and giving users the ability to extract zip data into excel doesn't have to involve add-ins vba or even formulas in this post will learn how using a parameterised weird for purposes of illustration we'll use an Excel workbook as a data source it contains a named range with data downloaded from the USbr ...
Video Length: 03:28
Uploaded By: Craig Hatmaker
View Count: 43,936

How to Export Table and Query Data to an Excel 2010/2013 File Using SSIS 2012
How to Export Table and Query Data to an Excel 2010/2013 File Using SSIS 2012

This video is part of LearnItFirst's SQL Server 2012: A Comprehensive Introduction course. More information on this video and course is available here: http://www.learnitfirst.com/Course170 Now that we have installed our instance of SQL Server Integration Services 2012, we will play around with it and explore some of its features. We will also cover some key terms, as well as the concepts of packages and tasks. Highlights from this video: br ...
Video Length: 18:08
Uploaded By: LearnItFirst.com
View Count: 20,885

SQL Server - Export SQL Query data to Excel
SQL Server - Export SQL Query data to Excel

SQL Server - Export SQL Query data to Excel More Info : http://gokhiel.com
Video Length: 01:46
Uploaded By: ComFix
View Count: 17,258

How-To Create An Excel Query!
How-To Create An Excel Query!

This short 3-minute video gets right to the point and shows you how to use your own Excel's name-ranges as tables in an Excel Query!! hr / bClosed Caption:/b yeah so either Benjamin sharp och and here doing a query today I'm glad you're joining i'll go ahead and show you how to do a Microsoft query but to be clear the type of query are going to use today only requires excel you need access or anything related to true database ...
Video Length: 03:29
Uploaded By: Ben Scharbach
View Count: 16,895

Excel 2010: Excel-Tabellen mit SQL/Query auslesen Teil1
Excel 2010: Excel-Tabellen mit SQL/Query auslesen Teil1

Erläutert wird der Abruf von Daten aus verschiedenen Excel-Mappen mittels SQL-Abfrage. In 1080p schauen!
Video Length: 07:22
Uploaded By: dabullaking33
View Count: 14,326

Excel 2013 Power BI Tools Part 2 - Getting Started with Power Query
Excel 2013 Power BI Tools Part 2 - Getting Started with Power Query

By Andy Brown http://www.wiseowl.co.uk - How to use Power Query within Excel 2013 to extract, transform and load data, including installing Power Query, creating and managing data transforms and choosing whether to load data into your worksheet, PowerPivot data model or both. Visit www.wiseowl.co.uk for more online training resources in Microsoft Excel, PowerPivot, SQL Server, Reporting Services, Analysis Services, Integration Services, ASP.NET, C#, Visual Basic, ...
Video Length: 16:39
Uploaded By: WiseOwlTutorials
View Count: 10,908

Copyright © 2025, Ivertech. All rights reserved.