Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8806113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:03:02+00:00 2026-06-14T02:03:02+00:00

I have access to an Access database and within that database are fields filled

  • 0

I have access to an Access database and within that database are fields filled with TSQL queries. These queries are processed by T-SQL on a server. So when I write these SQL queries and put them into a field for use by the end server, I’m unable to validate the syntax/etc. I could create a temporary query in that Access database, but it’s not the same query language. For example, Access would correctly use IIF but TSQL would not (it would instead be CASE).

I don’t have direct access to this server with TSQL, is there a way I can validate my T-SQL queries (for syntax and the like)? Perhaps a web tool online?

I should note I do not have access to the SQL server. Only the Access db and that alone. I understand it will not validate table names and the like, I wouldn’t expect it to.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:03:05+00:00Added an answer on June 14, 2026 at 2:03 am

    Actually, a combination of MattMc3’s answer and FremenFreedom’s answer should work.

    Download SQL Express.

    Then, declare the following stored procedure:

    create procedure IsValidSQL (@sql varchar(max)) as
    begin
        begin try
            set @sql = 'set parseonly on;'+@sql;
            exec(@sql);
        end try
        begin catch
            return(1);
        end catch;
        return(0);
    end; -- IsValidSQL
    

    You can test it with:

    declare @retval int;
    exec @retval = IsValidSQL 'select iif(val, 0, 1) from t';
    select @retval
    

    or with:

    declare @retval int;
    exec @retval = IsValidSQL 'select val from t';
    select @retval
    

    Note: this will catch the IIF() issue. It will not catch anything related to the table structures or column structures. You would need the schema for that and a slightly different approach (“select top 0 * from () t”) woudl do it.

    You might be able to do something with SQL Fiddle online. However, I would suggest having a local copy of the database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an access database with these tables: - sequences: it describes the sequences
I have an Access 2007 database that works asynchronously with a MAS200 database. Due
I have a ms access database that has one table for each photo album
I have a database with 2 sub forms within a form with fields as
I have an MS Access database that contains a table of dates, scores and
We have a Database in Sybase, which we access from a Java server. Access
I have an Access database (in Access 2003) with several tables, and data must
I have an Access database of 4M rows, each representing an individual customer order.
I have a Microsoft Access Database with an interface for usability ... But now,
I have an Access 2007 database and when I open it I can copy

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.