Re: $ sign in SQL clause in MS Query

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Jul 30, 1:23 pm, FredAker <FredA...@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
I use MS Query with data in text files. Now the text file has been moved to a
new location where the path name includes a "$" sign. This is not accepted by
MS Query. My SQL looks like this:

SELECT Airports.Currency, Airports.Market
FROM `\\aaa.xyz.qwe.int\groups$\Shared\Data`\Airports.csv Airports

It works fine if I map the drive with
  net use N: \\stoeai00.emea.kuoni.int\groups$
and change the SQL to
SELECT Airports.Currency, Airports.Market
FROM `N:\Shared\Data`\Airports.csv Airports

But I cannot do the drive mapping for all my users.

I would really appreciate help!

you need to escape the $. In MS SQL single quote is the escape
character . so you may change your query to :

SELECT Airports.Currency, Airports.Market
FROM "\\aaa.xyz.qwe.int\groups'$\Shared\Data"\Airports.csv Airports
.



Relevant Pages

  • Re: PHP query using WHERE with AND
    ... AND (pictures.markername LIKE $surname) ... Just picture it in context of the full query. ... the LIKE operator in SQL is mostly useless without at least ... Worse, failure to escape criteria can lead to SQL injection, ...
    (alt.php)
  • Re: PHP query using WHERE with AND
    ... Just picture it in context of the full query. ... the LIKE operator in SQL is mostly useless without at least ... imagine the following query when $surname ... Worse, failure to escape criteria can lead to SQL injection, ...
    (alt.php)
  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)
  • Re: Populating a list -- table structure?
    ... I had made a report already and figured out about adding the ... your responce below, but thanks to your help with SQL, I was able to get the ... It takes a summary from a select query and gives the ... KitID, long integer ...
    (microsoft.public.access.forms)
  • How do I do Paging through a large dataset via Stored Procedures
    ... Paging by dynamically altering the SQL Query ... Create stored procedures ... SELECT * FROM STUDENTS ...
    (microsoft.public.dotnet.framework.adonet)