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

  • SEARCH
  • Home
  • 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 8754797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:42:37+00:00 2026-06-13T13:42:37+00:00

I am using excel sql queries to fetch data from the backend according to

  • 0

I am using excel sql queries to fetch data from the backend according to the selection i make in a dropdown box.However my sql queries are not working in cases where there is a single quote(‘) in the dropdown box value. For example– Men’s Wear . Please suggest me a way to deal with this problem

    SQL = "select Segment,Weeks,Value from [Category performance data$] where       Departments='" &       Sheet3.Range("Dept_name").Value & _
     "' and Metric ='Total Spend' group by Segment,Weeks,Value"
    Call execQry   
  • 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-13T13:42:38+00:00Added an answer on June 13, 2026 at 1:42 pm
    Departments='" & replace(Sheet3.Range("Dept_name").Value, "'", "''") & _ "' and Metric
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using SSIS to import data from Excel sheets into SQL Server 2005, the
I am uploading data from Excel to SQL Server using the following structure: Private
I need to import data from Excel to Sql Server using ASP.NET. How can
I'm using Excel to pull data from an SQL db. I used the code
I need to make an excel file which would fetch data from connection to
I am trying to import data from excel to Sql Server using Import wizard.
I currently have SQL queries developed that fetch me the required data from my
Using Excel 2010 and SQL Server 2008 R2. I used import and export data
I'm using Excel 2010 to read some SQL data using an ODBC data connection.
I am using the following code to generate excel from sql through php.this is

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.