Showing posts with label characters. Show all posts
Showing posts with label characters. Show all posts

Monday, March 26, 2012

OUTER JOIN plus split? - how to?

Hi,

I have two tables.. one has a list of the UK postcodes.. well..it's actually the districts..

so it's the first two three or four characters (basically all UK postcodes are one or two letters.. then one or two numbers.. then a gap.. and then some more info)

So my first table has everything "before the gap" in seperate records.

My second table is full of exact postcodes.. so everything before and after the gap.

What I need to do is.. for each "full" postcode I have... strip it down so I get it formatted to everything before the gap.. and then find out how many of those I have...

This is also complicated because many of the "full postcodes" don't have the gap.

so if I have:

er56 7tr
fr2 4tg
er567tr
po3 8ty

I would want results of:

er56 - 2
fr2 - 1
po3 - 1

One I have that, I can bring in the second table with all of the parcial postcodes to do an OUTER JOIN and get the postcodes where I DONT have any results.

I know that's pretty complicated, so I'm stuggling a little!

sO i need to get the first "X" amount of characters out of a db value (it could be two values.. could be up to four- first one or two will be char, second one or two will be numeric), then do a count.

Can anyone help?

Just to help clarify:

If I was doing this ASP I would write it as:

get first value from string
- add to output string


get second value from string
- add to output string

get third value
If numeric - add to string
If not - stop loop

get fourth value
If numeric - add to string

If not - stop loop

|||

ok thought of an easier way - but still need help.

In my SELECT clause, need to have a variable which is gathered by the length of the postcode string.. so:

1) - Remove any spaces in string
2) - Check length
3) - If length = 5 then postcode = first 2 chars in string
4) - If length = 6 then postcode = first 3 chars in string
5) If length > 6 then postcode = first 4 chars in string.

Any ideas?

|||I have solved this, but have another issue which has surfaced - other post...

Tuesday, March 20, 2012

Other characters other than datetime in EM

When I clicked on tables and upon viewing all the tables on the right pane
in EM, the createdate column has some other characters appended to the
datetime... Has anyone seen that before ? Seems kinda buggy...Using SQL 2000If you have installed SQL Server 2005 on the same machine, that is the
cause...
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:OL2obVChEHA.636@.TK2MSFTNGP12.phx.gbl...
> When I clicked on tables and upon viewing all the tables on the right pane
> in EM, the createdate column has some other characters appended to the
> datetime... Has anyone seen that before ? Seems kinda buggy...Using SQL
2000
>|||Gotcha... I had a feeling it could have been but wasnt too sure.. How come ?
Kinda strange..
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23s2L9HFhEHA.712@.TK2MSFTNGP09.phx.gbl...
> If you have installed SQL Server 2005 on the same machine, that is the
> cause...
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:OL2obVChEHA.636@.TK2MSFTNGP12.phx.gbl...
> > When I clicked on tables and upon viewing all the tables on the right
pane
> > in EM, the createdate column has some other characters appended to the
> > datetime... Has anyone seen that before ? Seems kinda buggy...Using SQL
> 2000
> >
> >
>|||Don't know WHY, other than it seems to be a side-by-side tools issue. You
and I are not the only ones to notice the problem.
The easy solution, of course, is to use Query Analyzer to view lists of
tables and stored procedures. ;-)
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:es9rwFIhEHA.1724@.tk2msftngp13.phx.gbl...
> Gotcha... I had a feeling it could have been but wasnt too sure.. How come
?
> Kinda strange..
> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:%23s2L9HFhEHA.712@.TK2MSFTNGP09.phx.gbl...
> > If you have installed SQL Server 2005 on the same machine, that is the
> > cause...
> >
> > --
> > http://www.aspfaq.com/
> > (Reverse address to reply.)
> >
> >
> >
> >
> > "Hassan" <fatima_ja@.hotmail.com> wrote in message
> > news:OL2obVChEHA.636@.TK2MSFTNGP12.phx.gbl...
> > > When I clicked on tables and upon viewing all the tables on the right
> pane
> > > in EM, the createdate column has some other characters appended to the
> > > datetime... Has anyone seen that before ? Seems kinda buggy...Using
SQL
> > 2000
> > >
> > >
> >
> >
>

Other characters other than datetime in EM

When I clicked on tables and upon viewing all the tables on the right pane
in EM, the createdate column has some other characters appended to the
datetime... Has anyone seen that before ? Seems kinda buggy...Using SQL 2000
If you have installed SQL Server 2005 on the same machine, that is the
cause...
http://www.aspfaq.com/
(Reverse address to reply.)
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:OL2obVChEHA.636@.TK2MSFTNGP12.phx.gbl...
> When I clicked on tables and upon viewing all the tables on the right pane
> in EM, the createdate column has some other characters appended to the
> datetime... Has anyone seen that before ? Seems kinda buggy...Using SQL
2000
>
|||Gotcha... I had a feeling it could have been but wasnt too sure.. How come ?
Kinda strange..
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23s2L9HFhEHA.712@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> If you have installed SQL Server 2005 on the same machine, that is the
> cause...
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:OL2obVChEHA.636@.TK2MSFTNGP12.phx.gbl...
pane
> 2000
>
|||Don't know WHY, other than it seems to be a side-by-side tools issue. You
and I are not the only ones to notice the problem.
The easy solution, of course, is to use Query Analyzer to view lists of
tables and stored procedures. ;-)
http://www.aspfaq.com/
(Reverse address to reply.)
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:es9rwFIhEHA.1724@.tk2msftngp13.phx.gbl...
> Gotcha... I had a feeling it could have been but wasnt too sure.. How come
?[vbcol=seagreen]
> Kinda strange..
> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:%23s2L9HFhEHA.712@.TK2MSFTNGP09.phx.gbl...
> pane
SQL
>

Other characters other than datetime in EM

When I clicked on tables and upon viewing all the tables on the right pane
in EM, the createdate column has some other characters appended to the
datetime... Has anyone seen that before ? Seems kinda buggy...Using SQL 2000If you have installed SQL Server 2005 on the same machine, that is the
cause...
http://www.aspfaq.com/
(Reverse address to reply.)
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:OL2obVChEHA.636@.TK2MSFTNGP12.phx.gbl...
> When I clicked on tables and upon viewing all the tables on the right pane
> in EM, the createdate column has some other characters appended to the
> datetime... Has anyone seen that before ? Seems kinda buggy...Using SQL
2000
>|||Gotcha... I had a feeling it could have been but wasnt too sure.. How come ?
Kinda strange..
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23s2L9HFhEHA.712@.TK2MSFTNGP09.phx.gbl...
> If you have installed SQL Server 2005 on the same machine, that is the
> cause...
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:OL2obVChEHA.636@.TK2MSFTNGP12.phx.gbl...
pane[vbcol=seagreen]
> 2000
>|||Don't know WHY, other than it seems to be a side-by-side tools issue. You
and I are not the only ones to notice the problem.
The easy solution, of course, is to use Query Analyzer to view lists of
tables and stored procedures. ;-)
http://www.aspfaq.com/
(Reverse address to reply.)
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:es9rwFIhEHA.1724@.tk2msftngp13.phx.gbl...
> Gotcha... I had a feeling it could have been but wasnt too sure.. How come
?
> Kinda strange..
> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:%23s2L9HFhEHA.712@.TK2MSFTNGP09.phx.gbl...
> pane
SQL[vbcol=seagreen]
>

other characters (codes) that represent single quote

Hi,
I am trying to replace every single quote with two "single quotes", prior to
sending the dynamic sql string to sql server.
( from a C# application)
(in this case I have to send a dynamic string, cannot do parametarized
queries)
Question is....
Is there any other character that sql server will interpret as a "single
quote"?
Any help is deeply appreciated.
Thanks
NalakaHi Nalaka,
Thank you for your post.
Based on my scope, I don't think SQL Server will interpret other character
as single quote.
Here I would like provide some information about passing dynamic string to
SQL Server:
When possible, reject input that contains the following characters.
Input character Meaning in Transact-SQL
; Query delimiter
' Character data string delimiter
-- Comment delimiter
/* ... */ Comment delimiters. Text between /* and
*/ is not evaluated by the server.
Xp_ Begins the name of catalog extended stored
procedures such as xp_cmdshell.
You may need to refer the following article:
SQL Injection
http://msdn2.microsoft.com/en-us/library/ms161953.aspx
Hope this will be helpful!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks Wei,
This is what I don't understand... theoretically if I replace every single
quote with two single quotes.. all is well.
But there is a ton of articles suggesting all these other precautions.....
Nalaka
"Wei Lu" <weilu@.online.microsoft.com> wrote in message
news:1Kfz6%23FhGHA.5608@.TK2MSFTNGXA01.phx.gbl...
> Hi Nalaka,
> Thank you for your post.
> Based on my scope, I don't think SQL Server will interpret other character
> as single quote.
> Here I would like provide some information about passing dynamic string to
> SQL Server:
> When possible, reject input that contains the following characters.
> Input character Meaning in Transact-SQL
> ; Query delimiter
> ' Character data string delimiter
> -- Comment delimiter
> /* ... */ Comment delimiters. Text between /* and
> */ is not evaluated by the server.
> Xp_ Begins the name of catalog extended
> stored
> procedures such as xp_cmdshell.
> You may need to refer the following article:
> SQL Injection
> http://msdn2.microsoft.com/en-us/library/ms161953.aspx
> Hope this will be helpful!
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||"Nalaka" <nalaka12@.nospam.nospam> wrote in message
news:%23CKpYJOhGHA.2188@.TK2MSFTNGP04.phx.gbl...
> Thanks Wei,
> This is what I don't understand... theoretically if I replace every single
> quote with two single quotes.. all is well.
> But there is a ton of articles suggesting all these other
precautions.....
>
Most likely their concern for SQL injection attacks.
Basically any place you accept input, if you're not careful, a bad user
could do something like:
Enter First Name: dummy; select * from sysobjects
And if your select query isn't written well, it now becomes something like:
Select id from table where fname=dummy; select * from sysobjects and now
your sysobjects table has been returned to the hacker.
> Nalaka
>
> "Wei Lu" <weilu@.online.microsoft.com> wrote in message
> news:1Kfz6%23FhGHA.5608@.TK2MSFTNGXA01.phx.gbl...
> > Hi Nalaka,
> >
> > Thank you for your post.
> >
> > Based on my scope, I don't think SQL Server will interpret other
character
> > as single quote.
> >
> > Here I would like provide some information about passing dynamic string
to
> > SQL Server:
> >
> > When possible, reject input that contains the following characters.
> >
> > Input character Meaning in Transact-SQL
> > ; Query delimiter
> >
> > ' Character data string delimiter
> >
> > -- Comment delimiter
> >
> > /* ... */ Comment delimiters. Text between /*
and
> > */ is not evaluated by the server.
> >
> > Xp_ Begins the name of catalog extended
> > stored
> > procedures such as xp_cmdshell.
> >
> > You may need to refer the following article:
> >
> > SQL Injection
> > http://msdn2.microsoft.com/en-us/library/ms161953.aspx
> >
> > Hope this will be helpful!
> >
> > Sincerely,
> >
> > Wei Lu
> > Microsoft Online Community Support
> >
> > ==================================================> >
> > When responding to posts, please "Reply to Group" via your newsreader so
> > that others may learn and benefit from your issue.
> >
> > ==================================================> > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> >
>|||Hi Nalaka,
Thank you for the update.
As Greg mentioned, there is some secury issue you should considered in you
application code.
SQL injection should be avoid.
You could refer the article I posted in the previous post.
SQL Injection
http://msdn2.microsoft.com/en-us/library/ms161953.aspx
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks...
"Wei Lu" <weilu@.online.microsoft.com> wrote in message
news:ugdnCtVhGHA.5608@.TK2MSFTNGXA01.phx.gbl...
> Hi Nalaka,
> Thank you for the update.
> As Greg mentioned, there is some secury issue you should considered in you
> application code.
> SQL injection should be avoid.
> You could refer the article I posted in the previous post.
> SQL Injection
> http://msdn2.microsoft.com/en-us/library/ms161953.aspx
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hi Nalaka,
Glad to hear the information is helpful.
If you have any questions or concerns, please feel free to let me know.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.

other characters (codes) that represent single quote

Hi,
I am trying to replace every single quote with two "single quotes", prior to
sending the dynamic sql string to sql server.
( from a C# application)
(in this case I have to send a dynamic string, cannot do parametarized
queries)
Question is....
Is there any other character that sql server will interpret as a "single
quote"?
Any help is deeply appreciated.
Thanks
NalakaHi Nalaka,
Thank you for your post.
Based on my scope, I don't think SQL Server will interpret other character
as single quote.
Here I would like provide some information about passing dynamic string to
SQL Server:
When possible, reject input that contains the following characters.
Input character Meaning in Transact-SQL
; Query delimiter
' Character data string delimiter
-- Comment delimiter
/* ... */ Comment delimiters. Text between /* and
*/ is not evaluated by the server.
Xp_ Begins the name of catalog extended stored
procedures such as xp_cmdshell.
You may need to refer the following article:
SQL Injection
http://msdn2.microsoft.com/en-us/library/ms161953.aspx
Hope this will be helpful!
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks Wei,
This is what I don't understand... theoretically if I replace every single
quote with two single quotes.. all is well.
But there is a ton of articles suggesting all these other precautions.....
Nalaka
"Wei Lu" <weilu@.online.microsoft.com> wrote in message
news:1Kfz6%23FhGHA.5608@.TK2MSFTNGXA01.phx.gbl...
> Hi Nalaka,
> Thank you for your post.
> Based on my scope, I don't think SQL Server will interpret other character
> as single quote.
> Here I would like provide some information about passing dynamic string to
> SQL Server:
> When possible, reject input that contains the following characters.
> Input character Meaning in Transact-SQL
> ; Query delimiter
> ' Character data string delimiter
> -- Comment delimiter
> /* ... */ Comment delimiters. Text between /* and
> */ is not evaluated by the server.
> Xp_ Begins the name of catalog extended
> stored
> procedures such as xp_cmdshell.
> You may need to refer the following article:
> SQL Injection
> http://msdn2.microsoft.com/en-us/library/ms161953.aspx
> Hope this will be helpful!
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ========================================
==========
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||"Nalaka" <nalaka12@.nospam.nospam> wrote in message
news:%23CKpYJOhGHA.2188@.TK2MSFTNGP04.phx.gbl...
> Thanks Wei,
> This is what I don't understand... theoretically if I replace every single
> quote with two single quotes.. all is well.
> But there is a ton of articles suggesting all these other
precautions.....
>
Most likely their concern for SQL injection attacks.
Basically any place you accept input, if you're not careful, a bad user
could do something like:
Enter First Name: dummy; select * from sysobjects
And if your select query isn't written well, it now becomes something like:
Select id from table where fname=dummy; select * from sysobjects and now
your sysobjects table has been returned to the hacker.

> Nalaka
>
> "Wei Lu" <weilu@.online.microsoft.com> wrote in message
> news:1Kfz6%23FhGHA.5608@.TK2MSFTNGXA01.phx.gbl...
character[vbcol=seagreen]
to[vbcol=seagreen]
and[vbcol=seagreen]
>|||Hi Nalaka,
Thank you for the update.
As Greg mentioned, there is some secury issue you should considered in you
application code.
SQL injection should be avoid.
You could refer the article I posted in the previous post.
SQL Injection
http://msdn2.microsoft.com/en-us/library/ms161953.aspx
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks...
"Wei Lu" <weilu@.online.microsoft.com> wrote in message
news:ugdnCtVhGHA.5608@.TK2MSFTNGXA01.phx.gbl...
> Hi Nalaka,
> Thank you for the update.
> As Greg mentioned, there is some secury issue you should considered in you
> application code.
> SQL injection should be avoid.
> You could refer the article I posted in the previous post.
> SQL Injection
> http://msdn2.microsoft.com/en-us/library/ms161953.aspx
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ========================================
==========
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hi Nalaka,
Glad to hear the information is helpful.
If you have any questions or concerns, please feel free to let me know.
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.

Monday, March 12, 2012

osql vs. QA and extended characters

Hi, I have some sql commands I incorporate into an install and I've been
using scripts and osql.exe to perform these with generally good results.
A recent addition to these installs is a script that populates a table
of usernames and encryped passwords, and this is where I'm having
trouble. If I run a script in Query Analyzer that contains this line:
insert into operator (op_code, password, first_name, last_name,
security, operator, salespoint) values ('ADMIN', '??', 'ADMIN',
'ADMIN', 9, 'SYSTEM', 'SYSTEM')
I get predictable results and the encrypted password gets correctly
decrypted in our application.
If I run the very same script using osql like this:
osql.exe -E -i MyScript.sql -o "Output.txt"
The password doesn't end up in the database as '??', it seems to get
changed to '?+-' which obviously wouldn't decrypt correctly in the
application.
So this makes me think there's some kind of translation going on with
these extended characters when running the script via osql. Anyone know
how I can achieve the same results with osql as QA? I'm hoping there's a
switch or something that will do the trick. Thanks!
Matt
MattB wrote:
> Hi, I have some sql commands I incorporate into an install and I've
> been using scripts and osql.exe to perform these with generally good
> results.
> A recent addition to these installs is a script that populates a table
> of usernames and encryped passwords, and this is where I'm having
> trouble. If I run a script in Query Analyzer that contains this line:
> insert into operator (op_code, password, first_name, last_name,
> security, operator, salespoint) values ('ADMIN', '??', 'ADMIN',
> 'ADMIN', 9, 'SYSTEM', 'SYSTEM')
> I get predictable results and the encrypted password gets correctly
> decrypted in our application.
> If I run the very same script using osql like this:
> osql.exe -E -i MyScript.sql -o "Output.txt"
> The password doesn't end up in the database as '??', it seems to
> get changed to '?+-' which obviously wouldn't decrypt correctly in
> the application.
> So this makes me think there's some kind of translation going on with
> these extended characters when running the script via osql. Anyone
> know how I can achieve the same results with osql as QA? I'm hoping
> there's a switch or something that will do the trick. Thanks!
> Matt
See this page:
http://www.windowsitpro.com/SQLServe...ver_37470.html
David Gugick
Imceda Software
www.imceda.com
|||David Gugick wrote:
> MattB wrote:
>
> See this page:
> http://www.windowsitpro.com/SQLServe...ver_37470.html
>
Great. Thanks!
Matt

Saturday, February 25, 2012

OSQL + sql files with accent characters = problems!

Hi,
I've an SQL file which contain accent characters to fill my default values
like this:
insert into mtytable... values('Fvrier')
and also I create storedprocedures which execute some insert / update
command with the same values.
The SQL file is correct.
I've a batch file (.bat) which execute this command :
osql -E -i "MyScript.sql" -d MyDatabase
but the result is:
the accents disappeared !
Fvrier become Fvrier in the database!
My stored procedure has changed during the OSQL execution.
How can I solve the problem?
The storeprocedure (and other commands) are correct in the .sql file.
thanks.
Jerome.
"Jj" <willgart_A_@.hotmail_A_.com> wrote in message
news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
> Hi,
> I've an SQL file which contain accent characters to fill my default values
> like this:
> insert into mtytable... values('Fvrier')
> and also I create storedprocedures which execute some insert / update
> command with the same values.
> The SQL file is correct.
> I've a batch file (.bat) which execute this command :
> osql -E -i "MyScript.sql" -d MyDatabase
> but the result is:
> the accents disappeared !
> Fvrier become Fvrier in the database!
> My stored procedure has changed during the OSQL execution.
> How can I solve the problem?
> The storeprocedure (and other commands) are correct in the .sql file.
> thanks.
> Jerome.
>
osql can use Unicode input files, however, when you create the Unicode input
files,
you need to do so using UTF-16 rather than the default UTF-8.
HTH
Rick Sawtell
MCT, MCSD, MCDBA
|||ok, I'll try this
"Rick Sawtell" <quickening@.msn.com> wrote in message
news:uYdrCK0yEHA.2676@.TK2MSFTNGP12.phx.gbl...
> "Jj" <willgart_A_@.hotmail_A_.com> wrote in message
> news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
> osql can use Unicode input files, however, when you create the Unicode
> input files,
> you need to do so using UTF-16 rather than the default UTF-8.
> HTH
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>

OSQL + sql files with accent characters = problems!

Hi,
I've an SQL file which contain accent characters to fill my default values
like this:
insert into mtytable... values('Fvrier')
and also I create storedprocedures which execute some insert / update
command with the same values.
The SQL file is correct.
I've a batch file (.bat) which execute this command :
osql -E -i "MyScript.sql" -d MyDatabase
but the result is:
the accents disappeared !
Fvrier become Fvrier in the database!
My stored procedure has changed during the OSQL execution.
How can I solve the problem?
The storeprocedure (and other commands) are correct in the .sql file.
thanks.
Jerome.
"Jj" <willgart_A_@.hotmail_A_.com> wrote in message
news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
> Hi,
> I've an SQL file which contain accent characters to fill my default values
> like this:
> insert into mtytable... values('Fvrier')
> and also I create storedprocedures which execute some insert / update
> command with the same values.
> The SQL file is correct.
> I've a batch file (.bat) which execute this command :
> osql -E -i "MyScript.sql" -d MyDatabase
> but the result is:
> the accents disappeared !
> Fvrier become Fvrier in the database!
> My stored procedure has changed during the OSQL execution.
> How can I solve the problem?
> The storeprocedure (and other commands) are correct in the .sql file.
> thanks.
> Jerome.
>
osql can use Unicode input files, however, when you create the Unicode input
files,
you need to do so using UTF-16 rather than the default UTF-8.
HTH
Rick Sawtell
MCT, MCSD, MCDBA
|||ok, I'll try this
"Rick Sawtell" <quickening@.msn.com> wrote in message
news:uYdrCK0yEHA.2676@.TK2MSFTNGP12.phx.gbl...
> "Jj" <willgart_A_@.hotmail_A_.com> wrote in message
> news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
> osql can use Unicode input files, however, when you create the Unicode
> input files,
> you need to do so using UTF-16 rather than the default UTF-8.
> HTH
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>

OSQL + sql files with accent characters = problems!

Hi,
I've an SQL file which contain accent characters to fill my default values
like this:
insert into mtytable... values('Fvrier')
and also I create storedprocedures which execute some insert / update
command with the same values.
The SQL file is correct.
I've a batch file (.bat) which execute this command :
osql -E -i "MyScript.sql" -d MyDatabase
but the result is:
the accents disappeared !
Fvrier become Fvrier in the database!
My stored procedure has changed during the OSQL execution.
How can I solve the problem?
The storeprocedure (and other commands) are correct in the .sql file.
thanks.
Jerome."Jj" <willgart_A_@.hotmail_A_.com> wrote in message
news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
> Hi,
> I've an SQL file which contain accent characters to fill my default values
> like this:
> insert into mtytable... values('Fvrier')
> and also I create storedprocedures which execute some insert / update
> command with the same values.
> The SQL file is correct.
> I've a batch file (.bat) which execute this command :
> osql -E -i "MyScript.sql" -d MyDatabase
> but the result is:
> the accents disappeared !
> Fvrier become Fvrier in the database!
> My stored procedure has changed during the OSQL execution.
> How can I solve the problem?
> The storeprocedure (and other commands) are correct in the .sql file.
> thanks.
> Jerome.
>
osql can use Unicode input files, however, when you create the Unicode input
files,
you need to do so using UTF-16 rather than the default UTF-8.
HTH
Rick Sawtell
MCT, MCSD, MCDBA|||ok, I'll try this
"Rick Sawtell" <quickening@.msn.com> wrote in message
news:uYdrCK0yEHA.2676@.TK2MSFTNGP12.phx.gbl...
> "Jj" <willgart_A_@.hotmail_A_.com> wrote in message
> news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
> osql can use Unicode input files, however, when you create the Unicode
> input files,
> you need to do so using UTF-16 rather than the default UTF-8.
> HTH
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>

OSQL + sql files with accent characters = problems!

Hi,
I've an SQL file which contain accent characters to fill my default values
like this:
insert into mtytable... values('Février')
and also I create storedprocedures which execute some insert / update
command with the same values.
The SQL file is correct.
I've a batch file (.bat) which execute this command :
osql -E -i "MyScript.sql" -d MyDatabase
but the result is:
the accents disappeared !
Février become FÚvrier in the database!
My stored procedure has changed during the OSQL execution.
How can I solve the problem?
The storeprocedure (and other commands) are correct in the .sql file.
thanks.
Jerome."Jéjé" <willgart_A_@.hotmail_A_.com> wrote in message
news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
> Hi,
> I've an SQL file which contain accent characters to fill my default values
> like this:
> insert into mtytable... values('Février')
> and also I create storedprocedures which execute some insert / update
> command with the same values.
> The SQL file is correct.
> I've a batch file (.bat) which execute this command :
> osql -E -i "MyScript.sql" -d MyDatabase
> but the result is:
> the accents disappeared !
> Février become FÚvrier in the database!
> My stored procedure has changed during the OSQL execution.
> How can I solve the problem?
> The storeprocedure (and other commands) are correct in the .sql file.
> thanks.
> Jerome.
>
osql can use Unicode input files, however, when you create the Unicode input
files,
you need to do so using UTF-16 rather than the default UTF-8.
HTH
Rick Sawtell
MCT, MCSD, MCDBA|||ok, I'll try this
"Rick Sawtell" <quickening@.msn.com> wrote in message
news:uYdrCK0yEHA.2676@.TK2MSFTNGP12.phx.gbl...
> "Jéjé" <willgart_A_@.hotmail_A_.com> wrote in message
> news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
>> Hi,
>> I've an SQL file which contain accent characters to fill my default
>> values like this:
>> insert into mtytable... values('Février')
>> and also I create storedprocedures which execute some insert / update
>> command with the same values.
>> The SQL file is correct.
>> I've a batch file (.bat) which execute this command :
>> osql -E -i "MyScript.sql" -d MyDatabase
>> but the result is:
>> the accents disappeared !
>> Février become FÚvrier in the database!
>> My stored procedure has changed during the OSQL execution.
>> How can I solve the problem?
>> The storeprocedure (and other commands) are correct in the .sql file.
>> thanks.
>> Jerome.
>>
> osql can use Unicode input files, however, when you create the Unicode
> input files,
> you need to do so using UTF-16 rather than the default UTF-8.
> HTH
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>