Give space as an input in String Concatenate functoid - biztalk

I am trying to use String Concatenate Functoid to concatenate FirstName and LastName to FullName. I want a space in between FirstName and LastName. I want to add a space as input but it is not accepting.
Is there any way to do this?

When concatenating two (or more) strings, you can add a new constant item to the list of functoid inputs and assign a 'space' as constant value:

Related

SQLlite comma escape in match query

I have a match query for example:
select * from items where itemdesc MATCH (',')
The data that it returns its complete non sense - something that contains semicolons, dots etc.
The like query returns a correct dataset however.
select * from items where itemdesc like ('%,%')
How do correctly return the data in the MATCH query when I have the comma - the same issue persists with apostrophes, not sure if there are more characters that the match query does not like.
SQlite fts4 virtual tables don't handle punctuations and they just get replaced with the space instead...
https://www.sqlite.org/fts3.html#tokenizer
so what i did was just declare the tokenchars:
"tokenize=unicode61" + " \"" +"tokenchars=.,/?!:;\\"
Your actual search string you have to wrap with quotes as well - MATCH '",*"'
it doesn't handle quotes though....

Searching on Index with only two characters or less characters in search string in OrientDB

I am using Orient DB 2.1.16. I have a vertex class in orientDB called person, I also created a property for person class called name. I added a full text index on that property called person.name. I have a person type vertex where name property equals 'abcd'. When searching on index with query SELECT FROM INDEX:person.name WHERE KEY CONTAINSTEXT 'abc' I get correct resultset but when I search on the same index with only two characters I get no result back SELECT FROM INDEX:person.name WHERE KEY CONTAINSTEXT 'ab'.I don't understand why searching with on two characters does not return any results.

How shall I design this database?

So I've got to design a table for clients with fields (Id, name, bla, bla, Phone numbers). The last field terrifies me as there is not only one number, but many. I see 3 ways to accomplish this task
The field is String. Anytime before an insert, the String array of phone numbers is encoded using a delimiter ';' and thereafter inserted as String.
The field is BLOB. The string array is directly stored (no idea if this is possible in sqlite).
Create another table for Phone numbers with field (ClientId, PhoneNumber).
What seems the best approach?
As it is bad practice to store multiple values in one field, the third option stated is the regular way to go.

Difference Between "Text" and "String" datatype in SQLite

I have a SQLite database with my Android application. I have noticed I accidentally defined a table using a "String" datatype instead of "Text" datatype. Here is the code with string:
private final String LISTDATES_CREATE = "create table if not exists ListDates (_id integer primary key autoincrement, ListName string not null, UpdateDate string not null);";
This works. It has never thrown an error and I can store and retrieve data. However I can't find any reference to a "String" datatype in SQLite in the documentation or on the internet. Typically, all string type data is defined with "text" like so:
private final String LISTDATES_CREATE = "create table if not exists ListDates (_id integer primary key autoincrement, ListName text not null, UpdateDate text not null);";
So my question is, what is the difference between a field defined with a "string" datatype versus a "text" datatype? Is there a difference? If so, what are the consequences, if any, of using one or the other?
This is an old question, but I want to highlight a specific difference between a STRING and TEXT column types. If a string looks like a numeric value, STRING will convert it into a numeric value, while TEXT will not perform any conversion.
e.g.
create table t1(myint INTEGER, mystring STRING, mytext TEXT);
insert into t1 values ('0110', '0220', '0330');
insert into t1 values ('-0110', '-0220', '-0330');
insert into t1 values ('+0110', '+0220', '+0330');
insert into t1 values ('x0110', 'x0220', 'x0330');
insert into t1 values ('011.0', '022.0', '033.0');
select * from t1
will output rows with values:
myint mystring mytext
110 220 0330
-110 -220 -0330
110 220 +0330
x0110 x0220 x0330
11 22 033.0
This means leading zeros, zeros trailing decimal points, and plus symbol on the "numeric" values will be stripped. This will cause problems if you intend on doing a string match using the values read out of the table.
The subtle thing to note here is that SQLite does not enforce the data type of values you put into columns. That means that you can put text into a numeric field, and so on.
To understand the difference between your two SQL statements, check out section 2.1 Determination Of Column Affinity, which maps the column types you provide to the storage classes SQLite uses.
In this case, the type string gets mapped to storage class NUMERIC via rule 5. Declaring the field as text in code would tell the DBMS to use the TEXT storage class. Again, since SQLite does not enforce the types of columns, your code will probably run fine when storing Strings as a NUMERIC column, as you note.
As an alternative example, you could define a column with type INTERESTING STUFF, and that would be mapped to the INTEGER storage class, via rule 1.
Overall, it's probably a good idea to just use text for your table definition.

Can we insert Multiple check box Values in One Column?

i wan to insert multiple selected checkbox values to be inserted in to one column, can we do this. and if we can do it? please let me know how to do it......
thank you..
You could take all of the values and append them to a stringbuilder and then submit that to your db column
Use a Flags-type enum and store the integer value in the column.
If you want to want to have these 'multiple check boxes' values predefined then create a separate table for it. Otherwise if they are random, then there shouldn't be a problem. Just read them, append in a string and pass it to database.
You can use separator (like $,:,#...) to combine check boxes value and make one string and insert in to column. And when you want to retrieve that value just spilt that string.

Resources