Showing posts with label dear. Show all posts
Showing posts with label dear. Show all posts

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

Monday, March 19, 2012

How to recover SQL database from a removed laptop hard drive?

Dear group:

I have removed my hard drive from my laptop (which is now toast) and
have managed to recover nearly all the data from it by installing the
drive into my desktop. I was hoping to reboot the dektop to see if I
could load the operating system on the laptop's hard drive so I could
do a manual backup of the SQL database on it. This does not work.

Does anyone know of a way to recover my SQL database and all its tables
given the circumstances above?

TIA
ISZNevermind... I found the answer. I was able to successfully use the
follwing transact...

EXEC sp_attach_db @.dbname = N'****',
@.filename1 = N'g:\Program Files\Microsoft SQL
Server\MSSQL$****\Data\****_DB_Data.MDF',
@.filename2 = N'g:\Program Files\Microsoft SQL
Server\MSSQL$****\Data\****_DB_Log.LDF'|||Nevermind... I found the answer. I was able to successfully use the
follwing transact...

EXEC sp_attach_db @.dbname = N'****',
@.filename1 = N'g:\Program Files\Microsoft SQL
Server\MSSQL$****\Data\****_DB_Data.MDF',
@.filename2 = N'g:\Program Files\Microsoft SQL
Server\MSSQL$****\Data\****_DB_Log.LDF'|||Nevermind... I found the answer. I was able to successfully use the
follwing transact...

EXEC sp_attach_db @.dbname = N'****',
@.filename1 = N'g:\Program Files\Microsoft SQL
Server\MSSQL$****\Data\****_DB_Data.MDF',
@.filename2 = N'g:\Program Files\Microsoft SQL
Server\MSSQL$****\Data\****_DB_Log.LDF'|||Restore from a backup. You do have backups of your laptop of course...?
:-)
--
David Portas
SQL Server MVP
--|||<q2face@.hotmail.com> wrote in message
news:1108162896.401884.268390@.l41g2000cwc.googlegr oups.com...
> Dear group:
> I have removed my hard drive from my laptop (which is now toast) and
> have managed to recover nearly all the data from it by installing the
> drive into my desktop. I was hoping to reboot the dektop to see if I
> could load the operating system on the laptop's hard drive so I could
> do a manual backup of the SQL database on it. This does not work.
> Does anyone know of a way to recover my SQL database and all its tables
> given the circumstances above?
> TIA
> ISZ

If you can recover the .mdf and .ldf files from the laptop hard drive, you
could try attaching the database with sp_attach_db (or
sp_attach_single_file_db if you only have the .mdf file). But this may not
work at all, and your best option is, as David said, to restore from a
backup of the database.

Simon

Monday, March 12, 2012

How to read XML if I have no OWC?

Dear all,
I have a XML file which is generated from pivot table (using
"pivottable.xmldata" command to generate). Now, I want to read this file in
another computer. However, there is no office web component (OWC) in this
computer. I don't want to buy any commercial product to view the data. So,
how can I read the data in this file? Can I use datagrid to display the data?
Thanks!
Polly
Your best bet is probably to apply an XSLT stylesheet to render the XML data
as HTML. See
http://msdn.microsoft.com/library/de...ml/conXSLT.asp
for more information.
--
Graeme Malcolm
Principal Technologist
Content Master Ltd.
www.contentmaster.com
"Polly" <Polly@.discussions.microsoft.com> wrote in message
news:38E539D8-B5F6-4478-9277-84EC06152FAA@.microsoft.com...
Dear all,
I have a XML file which is generated from pivot table (using
"pivottable.xmldata" command to generate). Now, I want to read this file in
another computer. However, there is no office web component (OWC) in this
computer. I don't want to buy any commercial product to view the data. So,
how can I read the data in this file? Can I use datagrid to display the
data?
Thanks!
Polly