Rivercity Technology Services LTD Logo
HomeAbout Us
Technology Services
Icon showing a support technician
IT Support Services
Cybersecurity Risk Management at one predictable flat rate.
Icon showing a hand holding a phone
Business Phone Services
VoIP Telephone solutions from RCT. 
Icon showing a database and a cloud
Backups & Recovery
Cloud & On Premise - ready to recover!
Icon showing computer code on a monitor
Software Development
Web & Mobile App development
Icon showing website wireframes
Website Development & Hosting
Web design and full hosting & maintenance packages!
Icon showing an envelope being opened
Modern Email Management
Microsoft 365 email provisioning, security & management.
“You’re giving me the ‘it’s not you, it’s me’ routine? I invented ‘it’s not you, it’s me.’ Nobody tells me it’s them not me; if it’s anybody, it’s me.”
- George Costanza
Learning CenterContact Us
Book A Consultation
Illustration of a person writing a blog post with a pencil

SQL vs Access...what you NEED to know to do both and create a VIEW

Moving between SQL and Access there are a few tricks you need to know.   I thought it would be good to show some common areas which are stumbling blocks:

Commands:

Access vs SQL

CInt and CString    use       Cast or Convert (depending on scenario)

Nz([Field1,null)      use       Coalesce([field1],[field2],null, ....)

"string"                     use       'string'

#date#                      use       'date'

append query          use       insert

Like "*string"            use       like '%string'   (the % is the wildcard)

dbo_tblname           use       dbo.tblname     (the linked table can't hold a "." in it, and replaces it with an "_".

Query                         create          View

 Creating a VIEW to use in Access:

For moves to SQL, think about switching to Views for your larger power queries.  This will radically improve your database and the results of your queries.

  1. Build queries in Access.
  2. Change view to SQL View.
  3. Copy the code.
  4. Go to SSMS.
  5. Create a new View.
  6. Paste the code.
  7. Clean up the syntax (see above).
  8. Execute, test and debug.
  9. Save as a new View.
  10. In access link to the view and don't use your query.

Result = WAY FASTER QUERIES!  Views run server side on SQL Server, Queries are hit and miss and tend to pull data locally and run client side.  If you like this, say "thanks Jeff!".  You're welcome!

Jeff Shirley
Article Written by Jeff Shirley
Related Articles
2022 - Copyright, All Rights Reserved
crossmenu