Showing posts with label text. Show all posts
Showing posts with label text. Show all posts

Tuesday, March 20, 2012

a bulk insert question

I was given a text file to use to insert bulk-ly into a table.

The file is made up in a way that at the end of each line it has a very very long line of spaces (i.e a string). The last column in the table is supposed to accepted an nvarchar no bigger than 3. I know there's a possibility to increase the size of the nvarchar, but I want to avoid putting the string of spaces in the table.

How can I over come the problem with the file? obviously deleting each row of spaces is too much trouble for a file that has over 40000 rows...

I hope you can help me.

hi,
you can insert bulk insert the it first to a temporary table with the last column has a bigger size then have a SP that cleanse the data and insert it to the destination table.

- clintz|||

If it is just leading blanks then you need not to worry..

Instead of BULK INSERT use the OPENROWSET..

It will automatically remove the leading blanks..

SELECT

*

FROM

OPENROWSET

(

'MSDASQL',

'Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=c:\','SELECT * FROM Data.csv'

);

|||

I often consider it a good practice to first load data to a 'staging' table, a table with no constraints, indexes, etc.

Then after the data has been loaded, it is easy to have other procedures that 'cleanse' or conform the data before loading into the destination table. I can identify exceptions and set them aside for further inspection, I can 'transform' data into whatever form is required by the database, for example, 0 and 1 may be stored as 'M' and 'F' in the database (or vice-versa.)

I never assume that imported data will always meet the requirements of the database.

Monday, March 19, 2012

A baffeling problem between a text box and database table.

I have a web form with a text box that when submited gets put in a field in a table in an SQL database. Only 50 characters were being passed to the table. I gave the text box a max size of 200 characters and also found that the field in my table was set at 50 char. I had my SA set the field to 200 char. I rebuilt the solution and yet I am still only getting 50 charecters in the table. Any ideas?Show how you are setting the field in SQL Server.|||This is what I am doing to update my database.
'comments' is the field in question.
_______________________________________

Private Sub Update_Dataset()
Dim dr As DataRow = DataSet11.Tables("Results").NewRow()
dr("Area") = Area.SelectedItem
dr("Q1") = Q1.SelectedIndex + 1
dr("Q2") = Q2.SelectedIndex + 1
dr("Q3") = Q3.SelectedIndex + 1
dr("Q4") = Q4.SelectedIndex + 1
dr("Q5") = Q5.SelectedIndex + 1
dr("Q6") = Q6.SelectedIndex + 1
dr("Q7") = Q7.SelectedIndex + 1
dr("Q8") = Q8.SelectedIndex + 1
dr("Q9") = Q9.SelectedIndex + 1
dr("Comments") = Comments.Text
dr("ID") = 0
DataSet11.Tables("Results").Rows.Add(dr)
OleDbDataAdapter1.Update(DataSet11, "Results")

End Sub

__________________________________________________________

90degree text orientation for matrix column headers?

How can I get 90degree text orientation for matrix column headers?Hi,
Try setting Writing Mode of textbox property to tb-rl
WritingMode: tb-rl
Hope this helps
Ponnurangam
"KW" <newsgroups@.weinerk.mailshell.com> wrote in message
news:f9f22f30.0411091328.7f8a2bd6@.posting.google.com...
> How can I get 90degree text orientation for matrix column headers?

Sunday, March 11, 2012

7619 error message when you run a full text query that contains certain Turkish character

I receive a 7619 error message when I run a full text query that
contains certain Turkish character strings on an instance of SQL Server
2000 that is running on a Windows 2000-based computer. How can I solve
this problem?
The parser is interpreting these characters as noise or noise words. Which
word breaker are you using? I am assuming you are using the neutral word
breaker.
If this is the case the problem could be in your code page setting in the
web page. You should set the session.codepage to match the lcid for Turkish.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Ismail H. AYDIN" <dicisay@.hotmail.com> wrote in message
news:1117203863.089340.322710@.g49g2000cwa.googlegr oups.com...
>I receive a 7619 error message when I run a full text query that
> contains certain Turkish character strings on an instance of SQL Server
> 2000 that is running on a Windows 2000-based computer. How can I solve
> this problem?
>
|||I am running the query from SQL Query Analyzer and then error occurs.
Not from asp.net or asp page. The noise word is 'Ak'. And the other
noise charactes are '', '', ''.
*** Sent via Developersdex http://www.codecomments.com ***

Monday, February 13, 2012

48folderopen.jpg

A couple of days ago, I asked about changing the Reporting Services web page.
I asked about changing the "SQL Server Reporting Services" text, and
including a company logo where the folder icon now resides. I got a response
that I could change the text by clicking the Site Settings in the upper right
corner, and to look for the css under Program Files\Microsoft SQL Server.
Great start.
It turns out the name of the folder graphic is 48folderopen.jpg. I searched
inside every file on my hard drive, but could not find a reference to that
file name. I did find 48folderopen.jpg in a Microsoft SQL Server subdirectory
(images subdirectory). I renamed my logo.jpg to 48folderopen.jpg. I do see my
logo on the Reporting Services web page, but the sizing is all wrong and it
looks terrible.
Any pointers on where to find the sizing dimensions of 48folderopen.jpg so I
can resize to my logo size? It would also be nice to use my own file name
instead of 48folderopen.jpg, but that's not ciritical.
Thanks,
--
RandyIt is in Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportManager\images
--
"Everyone knows something you don't know"
"randy1200" wrote:
> A couple of days ago, I asked about changing the Reporting Services web page.
> I asked about changing the "SQL Server Reporting Services" text, and
> including a company logo where the folder icon now resides. I got a response
> that I could change the text by clicking the Site Settings in the upper right
> corner, and to look for the css under Program Files\Microsoft SQL Server.
> Great start.
> It turns out the name of the folder graphic is 48folderopen.jpg. I searched
> inside every file on my hard drive, but could not find a reference to that
> file name. I did find 48folderopen.jpg in a Microsoft SQL Server subdirectory
> (images subdirectory). I renamed my logo.jpg to 48folderopen.jpg. I do see my
> logo on the Reporting Services web page, but the sizing is all wrong and it
> looks terrible.
> Any pointers on where to find the sizing dimensions of 48folderopen.jpg so I
> can resize to my logo size? It would also be nice to use my own file name
> instead of 48folderopen.jpg, but that's not ciritical.
> Thanks,
> --
> Randy|||Your logo needs to be 48x48 pixels... :)
Unless you update the CSS sheet to size it correctly.
=-Chris
"randy1200" <randy1200@.newsgroups.nospam> wrote in message
news:39551613-4AA2-4D50-9AFA-00C9346C0487@.microsoft.com...
>A couple of days ago, I asked about changing the Reporting Services web
>page.
> I asked about changing the "SQL Server Reporting Services" text, and
> including a company logo where the folder icon now resides. I got a
> response
> that I could change the text by clicking the Site Settings in the upper
> right
> corner, and to look for the css under Program Files\Microsoft SQL Server.
> Great start.
> It turns out the name of the folder graphic is 48folderopen.jpg. I
> searched
> inside every file on my hard drive, but could not find a reference to that
> file name. I did find 48folderopen.jpg in a Microsoft SQL Server
> subdirectory
> (images subdirectory). I renamed my logo.jpg to 48folderopen.jpg. I do see
> my
> logo on the Reporting Services web page, but the sizing is all wrong and
> it
> looks terrible.
> Any pointers on where to find the sizing dimensions of 48folderopen.jpg so
> I
> can resize to my logo size? It would also be nice to use my own file name
> instead of 48folderopen.jpg, but that's not ciritical.
> Thanks,
> --
> Randy|||I see nothing in the ReportingServices.css that relates to an image size. Any
pointers here?
I was hoping to find something that said 48x48, and change it to 151x60,
which would work perfectly for me.
--
Randy
"Chris Conner" wrote:
> Your logo needs to be 48x48 pixels... :)
> Unless you update the CSS sheet to size it correctly.
> =-Chris
> "randy1200" <randy1200@.newsgroups.nospam> wrote in message
> news:39551613-4AA2-4D50-9AFA-00C9346C0487@.microsoft.com...
> >A couple of days ago, I asked about changing the Reporting Services web
> >page.
> > I asked about changing the "SQL Server Reporting Services" text, and
> > including a company logo where the folder icon now resides. I got a
> > response
> > that I could change the text by clicking the Site Settings in the upper
> > right
> > corner, and to look for the css under Program Files\Microsoft SQL Server.
> > Great start.
> >
> > It turns out the name of the folder graphic is 48folderopen.jpg. I
> > searched
> > inside every file on my hard drive, but could not find a reference to that
> > file name. I did find 48folderopen.jpg in a Microsoft SQL Server
> > subdirectory
> > (images subdirectory). I renamed my logo.jpg to 48folderopen.jpg. I do see
> > my
> > logo on the Reporting Services web page, but the sizing is all wrong and
> > it
> > looks terrible.
> >
> > Any pointers on where to find the sizing dimensions of 48folderopen.jpg so
> > I
> > can resize to my logo size? It would also be nice to use my own file name
> > instead of 48folderopen.jpg, but that's not ciritical.
> >
> > Thanks,
> > --
> > Randy
>
>|||Hello Randy,
Unfortunately, the picture size is hard-coded in the Report Manager, you
could not change it directly.
I looked inside the report manager code and found that it create a HTML
image and hard code the size to be 48 pixel.
You may send the feedback to the product team:
http://connect.microsoft.com/sqlserver.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
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.

Thursday, February 9, 2012

3rd party software

Does anyone know any software to backup single tables ? i recall one software that extracts the data into a text file called SQLinsert or something but wondering if they are others around ?Rey SQLLiteSpeed from DBAssociates (I think it has been bought by IMCEDA).