Is there any way to remove tabs from text fields? I see tabs at the end when I import the data in Excel.
Appreciate any helpSure, in the view that you are extracting use the Replace function, something like:CREATE VIEW vThingie
SELECT thingieId, Replace(thingieText, Char(9), ' ') AS d
FROM thingie
WHERE thingieId < 100...or something like that!
-PatP
Showing posts with label import. Show all posts
Showing posts with label import. Show all posts
Friday, March 30, 2012
Monday, March 26, 2012
How to Remove a charater from a SQL Data.
Dear Frineds
I have a hyperlink datatype column in Access database.I import that column into SQL Table.
Now my column in sql table say 'imp_cl 'have all data from Acces table.
But all record are prefix with"#" and at the end of value also have "#".
that means it imported in following way
eg. #//Server/image/img1.pdf#
Now I want to remove this # from both side.As we have around 80,000 record of same type,it is very difficult to do it record by record.
I would like to know aay fuction ,method or programme to remove this "#" from all record.
Thannk you
gracesonDECLARE @.c NVARCHAR(200)
SET @.c = '#//Server/image/img1.pdf#'
SELECT DataLength(@.c), @.c, SubString(@.c, 2, Datalength(@.c) / 2 - 2)
-PatP
I have a hyperlink datatype column in Access database.I import that column into SQL Table.
Now my column in sql table say 'imp_cl 'have all data from Acces table.
But all record are prefix with"#" and at the end of value also have "#".
that means it imported in following way
eg. #//Server/image/img1.pdf#
Now I want to remove this # from both side.As we have around 80,000 record of same type,it is very difficult to do it record by record.
I would like to know aay fuction ,method or programme to remove this "#" from all record.
Thannk you
gracesonDECLARE @.c NVARCHAR(200)
SET @.c = '#//Server/image/img1.pdf#'
SELECT DataLength(@.c), @.c, SubString(@.c, 2, Datalength(@.c) / 2 - 2)
-PatP
Wednesday, March 7, 2012
How to read a XML file from a stored procedure?
From a stored procedure, I would like to import into a varchar variable the
content of a
XML file before I invoke the sp_xml_preparedocument SP. If possible, I want
to avoid to
first have to import the XML file into a table.
Is it possible at all with SQL 2000 SP4 to directly import a XML file? How?
thanks.It seems XQuery is one way as I'm starting to read this article [1]
<%= Clinton Gallagher
[1] http://www.idealliance.org/proceedi.../XQueryRDS.html
"Gaetan" <me@.somewhere.com> wrote in message
news:4eqd129irfvdj5fem8v118jt9d6qd2gibm@.
4ax.com...
> From a stored procedure, I would like to import into a varchar variable
> the content of a
> XML file before I invoke the sp_xml_preparedocument SP. If possible, I
> want to avoid to
> first have to import the XML file into a table.
> Is it possible at all with SQL 2000 SP4 to directly import a XML file?
> How?
> thanks.|||XQuery could have been an avenue to explore had not been for the fact that I
'm stuck with
SQL 2000 SP4 for a while longer.
On Tue, 14 Mar 2006 10:26:15 -0600, "clintonG"
< csgallagher@.REMOVETHISTEXTmetromilwaukee
.com> wrote:
>It seems XQuery is one way as I'm starting to read this article [1]
><%= Clinton Gallagher
>[1] http://www.idealliance.org/proceedi.../XQueryRDS.html
>|||You would have to write an extended stored procedure that reads the data
from a file. SQL Server 2005 has native ability to read from a file but not
SQL Server 2000.
My recommendation is to read the file in the client code and pass it to the
database as a stored procedure parameter...
Best regards
Michael
"Gaetan" <me@.somewhere.com> wrote in message
news:4eqd129irfvdj5fem8v118jt9d6qd2gibm@.
4ax.com...
> From a stored procedure, I would like to import into a varchar variable
> the content of a
> XML file before I invoke the sp_xml_preparedocument SP. If possible, I
> want to avoid to
> first have to import the XML file into a table.
> Is it possible at all with SQL 2000 SP4 to directly import a XML file?
> How?
> thanks.|||we are haveing a similar issue attempting to read xml through our own
firewall, (we can only have sql port and port 80 available) so no fileopen
methods are available:
so we cant use vbnet:readxml method as the filepath violates firewall
security: it is becoming a showstopper for our solution . if we could
paramaterise a sp passing in the filename problem would be solved.
All we have found so far is a declare @.doc; exec @.doc = cmdShell
and execute a dos "type" command to type out the contents into the variable.
There are several examples of this method on the net.
"Michael Rys [MSFT]" <mrys@.online.microsoft.com> wrote in message
news:uoqgZ$uTGHA.1708@.TK2MSFTNGP14.phx.gbl...
> You would have to write an extended stored procedure that reads the data
> from a file. SQL Server 2005 has native ability to read from a file but
> not SQL Server 2000.
> My recommendation is to read the file in the client code and pass it to
> the database as a stored procedure parameter...
> Best regards
> Michael
> "Gaetan" <me@.somewhere.com> wrote in message
> news:4eqd129irfvdj5fem8v118jt9d6qd2gibm@.
4ax.com...
>
content of a
XML file before I invoke the sp_xml_preparedocument SP. If possible, I want
to avoid to
first have to import the XML file into a table.
Is it possible at all with SQL 2000 SP4 to directly import a XML file? How?
thanks.It seems XQuery is one way as I'm starting to read this article [1]
<%= Clinton Gallagher
[1] http://www.idealliance.org/proceedi.../XQueryRDS.html
"Gaetan" <me@.somewhere.com> wrote in message
news:4eqd129irfvdj5fem8v118jt9d6qd2gibm@.
4ax.com...
> From a stored procedure, I would like to import into a varchar variable
> the content of a
> XML file before I invoke the sp_xml_preparedocument SP. If possible, I
> want to avoid to
> first have to import the XML file into a table.
> Is it possible at all with SQL 2000 SP4 to directly import a XML file?
> How?
> thanks.|||XQuery could have been an avenue to explore had not been for the fact that I
'm stuck with
SQL 2000 SP4 for a while longer.
On Tue, 14 Mar 2006 10:26:15 -0600, "clintonG"
< csgallagher@.REMOVETHISTEXTmetromilwaukee
.com> wrote:
>It seems XQuery is one way as I'm starting to read this article [1]
><%= Clinton Gallagher
>[1] http://www.idealliance.org/proceedi.../XQueryRDS.html
>|||You would have to write an extended stored procedure that reads the data
from a file. SQL Server 2005 has native ability to read from a file but not
SQL Server 2000.
My recommendation is to read the file in the client code and pass it to the
database as a stored procedure parameter...
Best regards
Michael
"Gaetan" <me@.somewhere.com> wrote in message
news:4eqd129irfvdj5fem8v118jt9d6qd2gibm@.
4ax.com...
> From a stored procedure, I would like to import into a varchar variable
> the content of a
> XML file before I invoke the sp_xml_preparedocument SP. If possible, I
> want to avoid to
> first have to import the XML file into a table.
> Is it possible at all with SQL 2000 SP4 to directly import a XML file?
> How?
> thanks.|||we are haveing a similar issue attempting to read xml through our own
firewall, (we can only have sql port and port 80 available) so no fileopen
methods are available:
so we cant use vbnet:readxml method as the filepath violates firewall
security: it is becoming a showstopper for our solution . if we could
paramaterise a sp passing in the filename problem would be solved.
All we have found so far is a declare @.doc; exec @.doc = cmdShell
and execute a dos "type" command to type out the contents into the variable.
There are several examples of this method on the net.
"Michael Rys [MSFT]" <mrys@.online.microsoft.com> wrote in message
news:uoqgZ$uTGHA.1708@.TK2MSFTNGP14.phx.gbl...
> You would have to write an extended stored procedure that reads the data
> from a file. SQL Server 2005 has native ability to read from a file but
> not SQL Server 2000.
> My recommendation is to read the file in the client code and pass it to
> the database as a stored procedure parameter...
> Best regards
> Michael
> "Gaetan" <me@.somewhere.com> wrote in message
> news:4eqd129irfvdj5fem8v118jt9d6qd2gibm@.
4ax.com...
>
How to read a XML file from a stored procedure?
From a stored procedure, I would like to import into a varchar variable the content of a
XML file before I invoke the sp_xml_preparedocument SP. If possible, I want to avoid to
first have to import the XML file into a table.
Is it possible at all with SQL 2000 SP4 to directly import a XML file? How?
thanks.
It seems XQuery is one way as I'm starting to read this article [1]
<%= Clinton Gallagher
[1] http://www.idealliance.org/proceedin...XQueryRDS.html
"Gaetan" <me@.somewhere.com> wrote in message
news:4eqd129irfvdj5fem8v118jt9d6qd2gibm@.4ax.com...
> From a stored procedure, I would like to import into a varchar variable
> the content of a
> XML file before I invoke the sp_xml_preparedocument SP. If possible, I
> want to avoid to
> first have to import the XML file into a table.
> Is it possible at all with SQL 2000 SP4 to directly import a XML file?
> How?
> thanks.
|||XQuery could have been an avenue to explore had not been for the fact that I'm stuck with
SQL 2000 SP4 for a while longer.
On Tue, 14 Mar 2006 10:26:15 -0600, "clintonG"
<csgallagher@.REMOVETHISTEXTmetromilwaukee.com> wrote:
>It seems XQuery is one way as I'm starting to read this article [1]
><%= Clinton Gallagher
>[1] http://www.idealliance.org/proceedin...XQueryRDS.html
>
|||You would have to write an extended stored procedure that reads the data
from a file. SQL Server 2005 has native ability to read from a file but not
SQL Server 2000.
My recommendation is to read the file in the client code and pass it to the
database as a stored procedure parameter...
Best regards
Michael
"Gaetan" <me@.somewhere.com> wrote in message
news:4eqd129irfvdj5fem8v118jt9d6qd2gibm@.4ax.com...
> From a stored procedure, I would like to import into a varchar variable
> the content of a
> XML file before I invoke the sp_xml_preparedocument SP. If possible, I
> want to avoid to
> first have to import the XML file into a table.
> Is it possible at all with SQL 2000 SP4 to directly import a XML file?
> How?
> thanks.
XML file before I invoke the sp_xml_preparedocument SP. If possible, I want to avoid to
first have to import the XML file into a table.
Is it possible at all with SQL 2000 SP4 to directly import a XML file? How?
thanks.
It seems XQuery is one way as I'm starting to read this article [1]
<%= Clinton Gallagher
[1] http://www.idealliance.org/proceedin...XQueryRDS.html
"Gaetan" <me@.somewhere.com> wrote in message
news:4eqd129irfvdj5fem8v118jt9d6qd2gibm@.4ax.com...
> From a stored procedure, I would like to import into a varchar variable
> the content of a
> XML file before I invoke the sp_xml_preparedocument SP. If possible, I
> want to avoid to
> first have to import the XML file into a table.
> Is it possible at all with SQL 2000 SP4 to directly import a XML file?
> How?
> thanks.
|||XQuery could have been an avenue to explore had not been for the fact that I'm stuck with
SQL 2000 SP4 for a while longer.
On Tue, 14 Mar 2006 10:26:15 -0600, "clintonG"
<csgallagher@.REMOVETHISTEXTmetromilwaukee.com> wrote:
>It seems XQuery is one way as I'm starting to read this article [1]
><%= Clinton Gallagher
>[1] http://www.idealliance.org/proceedin...XQueryRDS.html
>
|||You would have to write an extended stored procedure that reads the data
from a file. SQL Server 2005 has native ability to read from a file but not
SQL Server 2000.
My recommendation is to read the file in the client code and pass it to the
database as a stored procedure parameter...
Best regards
Michael
"Gaetan" <me@.somewhere.com> wrote in message
news:4eqd129irfvdj5fem8v118jt9d6qd2gibm@.4ax.com...
> From a stored procedure, I would like to import into a varchar variable
> the content of a
> XML file before I invoke the sp_xml_preparedocument SP. If possible, I
> want to avoid to
> first have to import the XML file into a table.
> Is it possible at all with SQL 2000 SP4 to directly import a XML file?
> How?
> thanks.
Subscribe to:
Posts (Atom)