Re: Escape char or Quoting char

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Douglas J. Steele (NOSPAM_djsteele_at_NOSPAM_canada.com)
Date: 06/15/04


Date: Tue, 15 Jun 2004 17:57:25 -0400

Are you getting an error message? If so, what is it? If not, is it just a
case that you're not getting that specific product back? If so, are you sure
you've typed it exactly as it is in the table?

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Rajat" <anonymous@discussions.microsoft.com> wrote in message
news:1c91101c452d7$d8188b70$a501280a@phx.gbl...
>
> Doug,
> That didn't help.  Any other ideas?
> Thanks,
> Rajat
>
> >-----Original Message-----
> >Try doubling the quote:
> >
> > "PIVOT tblCurrentMonth.[Product Name] In ('Data
> Center','Desktop','Internet
> >Hosting','Market Data','Messaging &
> Mobile', 'Network', 'Other', 'Projects',
> >'Technology Requests (MAC''s)','Voice & Conferencing');"
> >
> >
> >-- 
> >Doug Steele, Microsoft Access MVP
> >http://I.Am/DougSteele
> >(no e-mails, please!)
> >
> >
> >"Rajat" <anonymous@discussions.microsoft.com> wrote in
> message
> >news:1c1b301c4524d$d7d35fd0$a301280a@phx.gbl...
> >>
> >> Hi,
> >>
> >> I am constructing a string which encloses an SQL stmt:
> >>
> >> strQuery = "TRANSFORM Sum(tblCurrentMonth.[Total Price])
> >> AS [SumOfTotal Price] " & _
> >> "SELECT tblCurrentMonth.StdEC, tblExpenseCodes." &
> >> Me.cboManagerLevel & " AS [Report Client],
> tblCurrentMonth.
> >> [Billing Cycle Name], Sum(tblCurrentMonth.[Total Price])
> >> AS Total " & _
> >> "FROM tblCurrentMonth INNER JOIN tblExpenseCodes ON
> >> tblCurrentMonth.StdEC = tblExpenseCodes.StdEC " & _
> >> "WHERE ((([tblExpenseCodes]." & Me.cboManagerLevel & ")
> >> = '" & strReportClient & "')) " & _
> >> "GROUP BY tblCurrentMonth.StdEC,
> tblExpenseCodes.Manager,
> >> tblCurrentMonth.[Billing Cycle Name] " & _
> >> "PIVOT tblCurrentMonth.[Product Name] In ('Data
> >> Center','Desktop','Internet Hosting','Market
> >> Data','Messaging &
> >> Mobile', 'Network', 'Other', 'Projects', 'Technology
> >> Requests (MAC's)','Voice & Conferencing');"
> >>
> >> The problem is that MAC's comes with its own apostrophe
> >> which is part of the data.
> >>
> >> I would need a third quoting mechanism or an escape char
> >> that tells the program that this is part of the data.
> >>
> >> Please suggest a way.
> >>
> >> Thanks,
> >>
> >> Rajat
> >>
> >>
> >
> >
> >.
> >


Relevant Pages