 | 
28-Jul-2006, 08:31 AM
|  | Guest | | | | | | | | | | Need help printing " double quotes I've got the following code... I need the number to be in "double
quotes", not 'single quotes' Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/12708-need-help-printing-double-quotes.html
so it will look like this when it prints:
UPDATE TableName SET ColumnName =
'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName=
"021615039");
any ideas? here's the code:
Option Compare Database
Public Sub buildSQL()
Open "C:\UpdateUSAAID\1.txt" For Input As #1
Open "C:\UpdateUSAAID\excludeListSQL.txt" For Output As #2 Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12708
Do While Not EOF(1)
Line Input #1, excludeMember
Print #2, "UPDATE TableName SET ColumnName =
'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName = '" &
excludeMember & "');"
Loop
Close #1
Close #2
End Sub
Thanks! Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh! | 
28-Jul-2006, 08:31 AM
|  | Guest | | | | | | | | | | Re: Need help printing " double quotes Replace each apostrophe with TWO double quotes:
Print #2, "UPDATE TableName SET ColumnName =
'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName = """ &
excludeMember & """);"
--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription: http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L
"James" wrote in message
news:1152209841.073526.227240@s53g2000cws.googlegr oups.com...
> I've got the following code... I need the number to be in "double
> quotes", not 'single quotes' Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12708
>
> so it will look like this when it prints:
>
> UPDATE TableName SET ColumnName =
> 'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName=
> "021615039");
>
>
> any ideas? here's the code:
>
> Option Compare Database
>
> Public Sub buildSQL()
> Open "C:\UpdateUSAAID\1.txt" For Input As #1
> Open "C:\UpdateUSAAID\excludeListSQL.txt" For Output As #2
>
> Do While Not EOF(1) Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12708
>
> Line Input #1, excludeMember
>
> Print #2, "UPDATE TableName SET ColumnName =
> 'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName = '" &
> excludeMember & "');"
>
>
> Loop
> Close #1
> Close #2
> End Sub
>
>
>
> Thanks!
> | 
28-Jul-2006, 08:31 AM
|  | Guest | | | | | | | | | | Re: Need help printing " double quotes I figured it out, thanks though.... code looks like this in case you
care.
Print #2, "UPDATE TableName SET ColumnName = Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12708
'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName = '""" & Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12708
excludeMember & "'"");"
James wrote:
> I've got the following code... I need the number to be in "double
> quotes", not 'single quotes'
>
> so it will look like this when it prints:
>
> UPDATE TableName SET ColumnName =
> 'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName=
> "021615039");
>
>
> any ideas? here's the code:
>
> Option Compare Database
>
> Public Sub buildSQL()
> Open "C:\UpdateUSAAID\1.txt" For Input As #1
> Open "C:\UpdateUSAAID\excludeListSQL.txt" For Output As #2
>
> Do While Not EOF(1)
>
> Line Input #1, excludeMember
>
> Print #2, "UPDATE TableName SET ColumnName =
> 'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName = '" &
> excludeMember & "');"
>
>
> Loop
> Close #1
> Close #2
> End Sub
>
>
>
> Thanks! | 
28-Jul-2006, 08:31 AM
|  | Guest | | | | | | | | | | Re: Need help printing " double quotes Use the Chr function: Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12708
Print #2, "UPDATE TableName SET ColumnName =
'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName = '" & Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12708
Chr(34) &
excludeMember & chr(34) & "');"
James wrote:
> I've got the following code... I need the number to be in "double
> quotes", not 'single quotes'
>
> so it will look like this when it prints:
>
> UPDATE TableName SET ColumnName =
> 'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName=
> "021615039");
>
>
> any ideas? here's the code:
>
> Option Compare Database
>
> Public Sub buildSQL()
> Open "C:\UpdateUSAAID\1.txt" For Input As #1
> Open "C:\UpdateUSAAID\excludeListSQL.txt" For Output As #2
>
> Do While Not EOF(1)
>
> Line Input #1, excludeMember
>
> Print #2, "UPDATE TableName SET ColumnName =
> 'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName = '" &
> excludeMember & "');"
>
>
> Loop
> Close #1
> Close #2
> End Sub
>
>
>
> Thanks! | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Active Discussions | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |