adding several lines of text to an Access database - ms-access-2007

Would like to know what the best option is for adding several lines of text to a field of an access database(more than 255 characters of text). The text would be a recipe for example or the method of making the dish. Is it possible to add a textfile to a field of an access database for example?
Kind regards

You can use the Memo field type. It stores up to 63,999 characters.
Here are the details:
http://office.microsoft.com/en-au/access-help/field-data-types-available-in-access-mdb-HP005238518.aspx
OLE Object also let you store Word Documents and so on. So you can try using it if you are still short with 63,999 characters.
Hope this helps you

Related

Column size of Google Big Query

I am populating the data from server to google big query. One of the attributes in the table is a string that has close to 150+ characters in it.
For example, "Had reseller test devices in a vehicle with known working device
Set to power cycle, never got green light Checked with cell provider and all SIMs were active all cases the modem appears to be dead,light in all but not green light".
Table in GBQ gets populated until it hits this specific attribute. When this attribute is about to load, this does not get loaded in the single cell. It gets splitted into different cells and it corroupts the table.
Is there any restriction on each field of the GBQ? Any information regarding this would be appreciated.
My guess is that quote and comma characters in the CSV data are confusing the CSV parser. For example, if one of your fields is hello, world, this will look like two separate fields. The way around this is to quote the field, so you'd need "hello, world". This, of course, has problems if you have embedded quotes in the field. For instance if you wanted to have a field that said She said, "Hello, world", you would either need to escape the quotes by doubling the internal quotes, as in "She said, ""Hello, world""", or by using a different field separator (for instance, |) and dropping the quote separator (using \0).
One final complication is if you have embedded newlines in your field. If you have Hello\nworld, this means you need to set the allow_quoted_newlines on the load job configuration. The downside is that large files will be slower to import with this option, since they can't be done in parallel.
These configuration options are all described here, and can be used via either the web UI or the bq command line shell.
I'm not sure there is a limit imposed, and certainly I have seen string fields with over 8,000 characters.
Can you please clarify, 'When this attribute is about to load, this does not get loaded in the single cell. It gets splitted into different cells and it corroupts the table.'? Does this happen every time? Could it be associated with certain punctuation?

Understanding Raw Data

When I was going through all the tables in my database, I could see a table called Measbinary and an attribute attracted me was RawData. Which is Image type and Allow null. I have attached a screenshot of the table Could someone help me understand what is that? and how could I understand How it has been processed ?
Update : I checked the stored procedures and could find that the image parameter is passed to it like
SP_StoreBinary #rawspectra image
and then the value is inserted to the table mentioned above.
This is the raw data of a binary field. It has "no meaning" except being a way for SSMS (Management Studio) to show SOMETHING for a binary field. Remember - SSMS (and the database) have no clue what is in that field (image, word document, whatever) and how to show it. A hex coded string is "as good as it gets" as a generic approach, as it allows a programmer to compare the first bytes.

SQL Parse NVARCHAR Field

I am loading data from Excels into database on SQL Server 2008. There is one column which is in nvarchar data type. This field contains the data as
Text text text text text text text text text text.
(ABC-2010-4091, ABC-2011-0586, ABC-2011-0587, ABC-2011-0604)
Text text text text text text text text text text.
(ABC-2011-0562, ABC-2011-0570, ABC-2011-0575, ABC-2011-0588)
so its text with many sentences of this kind.
For each row I need to get the data ABC-####-####, respectivelly I only need the last part. So e.g. for ABC-2010-4091 I need to obtain 4091. This number I will need to join to other table. I guess it would be enough to get the last parts of the format ABC-####-####, then I should be able to handle the request.
So the example of given above, the result should be 4091, 0586, 0587, 0604, 0562, 0570, 0575, 0588 in the row instead of the whole nvarchar value field.
Is this possible somehow? The text in the nvarchar field differ, but the text format (ABC-####-####) I want to work with is still the same. Only the count of characters for the last part may vary so its not only 4 numbers, but could be 5 or more.
What is the best approach to get these data? Should I parse it in SSIS or on the SQL server side with SQL Query? And how?
I am aware this is though task. I appreciate every help or advice how to deal with this. I have not tried anything yet as I do not know where to start. I read articles about SQL parsing, but I want to ask for best approach to deal with this task.
Stackoverflow is about programming.
Sit down and start programming.
Ok, seriously. That is string parsing and the last part in brackets with multiple fields means no bulk import, it is not a standard CSV file.
Either you use SSIS in SQL Server and program the parsing there or.... you write a program for that.
String maniupation in SQL is the worst part of the language and I would avoid it.
So, yes, sit down and program a routine. Probable the fastest way.
If I understand correctly, "ABS-####-####" will be the value coming through in the column and the numeric part is variable in length.
If that is the case, maybe this will work.
Use a "Derived Column" transformation.
Lets say we call "ABC-####-####" = Column1
SUBSTRING("Column1",(FINDSTRING("Column1","-",2)+1),LEN(Column1)-(FINDSTRING("Column1","-",2)))
If I am not mistaken, that should give you the last # values in a new column no matter how long that value is.
HTH
I have worked this problem out with the following guides:
Split Multi Value Column into Multiple Records &
Remove Multiple Spaces with Only One Space

Getting long 'dirty' strings from SQL Server database into a 'clean' excel file

I Have a table in which comments are kept about clients. This is an open field and be very long and include line breaks.
When I try and export this to Excel, the data is misaligned. I'd like to return as much of the comment as possible in an excel cell, without anything like a line break.
Is there a way I could do this in Excel? (Find and replace)
Is there a way to structure my SQL query to only return what I can fit?
Or is there a better way?
I found the best way to deal with this is to enclose all suspect String columns with Speech marks "" and then in excel under the text to columns option make sure to select speech marks as a text qualifier.
This always worked for me.
Just be sure to remove speech marks from the string column in question otherwise it will split it again.
Another method i used was to used an obscure delimiter like an Ibar | which was not likely to be found in my data and by again using the Text to columns option i specified the IBar as the column separator which did just what i needed.
T

Untokenized field in Lucene search

I have stored a field in index file which is untokenized. When I try to get that field value from the index file I'm not able to do get it.
Note: I have another one untokenized field, there I'm able to get that value, the data stored in this field are not having any white spaces among this.
Example: (smith,david,walter,john)... But the one I'm asking is having white spaces among it. Example: (david smith,mark john,bill man)...
I don't think this might be the reason.
Your help is appreciated.
Remember that tokenization or lack of it has to be done both while indexing and searching.
Did you try using a keywordTokenizer in the search side?