1,463 questions
0
votes
2
answers
327
views
How to add string value to cell in SQL using php?
I am trying to update varchar cell in SQL users table. Now the value of groups_id is 3. $last_id = 4. I want to change it to 3, 4. Could you please tell me what I am doing wrong?
With this code the ...
2
votes
2
answers
56
views
Querying SQL column varchar6 containing numbers with a between statement
The table has a column that is type varchar6 containing 6 numbers between 000000 to 999999, or is empty.
No matter what values you give the various variables for this column SEQ, it keeps returning no ...
0
votes
1
answer
63
views
Searching within a SQL query
I'm trying to get my query to use a where clause to find information coming back from a query that is casting a particular column as varbinary and varchar. I have to cast because the original data is ...
3
votes
1
answer
6k
views
MySQL ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
I have a MySQL table and I have the need of increasing the capacity of two columns. One column resized fine with this command:
ALTER TABLE TABLE_NAME MODIFY COLUMN COLUMN_NAME varchar(7000);
The ...
1
vote
3
answers
3k
views
Hive Alter table column size in VARCHAR
I am pretty new in Hive and I have created a table below few months ago
create table TableName
(
EntityRelationship varchar(20),
EntityID varchar(50),
EntityName varchar(50),
...
0
votes
1
answer
56
views
Using VARCHAR in Mysql
Can I use VARCHAR to store this GVC/AK/CR/1/2017/001?
CREATE TABLE clients
(
client_id INT AUTO_INCREMENT ,
name VARCHAR (50),
phone_no INT (11),
plan_no VARCHAR (20),
...
0
votes
1
answer
761
views
Django Char vs. Varchar
Please Help, I have an existing database that uses a char(12) as its PK.
CREATE TABLE sop_customer (
customer_id char(12) NOT NULL,
PRIMARY KEY (customer_id),
) ENGINE=InnoDB DEFAULT CHARSET=utf8;...
0
votes
1
answer
186
views
LOCATE function on TEXT column
Is it possible to use the Locate() function on TEXT column, or is there any alternative to it for TEXT fields.
the thing is we have LARGE varchars (65kb) that we use to track for subscriptions, so we ...
-1
votes
3
answers
1k
views
How to convert VARCHAR date to a standard MYSQL date format when doing LOAD DATA INFILE
In my table I have an entire column that has varchar date, here is what it looks like: 2/1/2020 02:30:00 (date is m/d/yyyy) I want it to convert to standard MySQL date format (yyyy-mm-dd) or maybe if ...
0
votes
1
answer
47
views
An issue related to changing varchar to datetime in SQL
I have a question related to data type. Now I'm trying to import a flat file into my destination database.
I import the flat file into one table A inside my staging database. All the columns in table ...
0
votes
0
answers
47
views
Converting a particular cell in a column of type varchar to nvarchar [duplicate]
I have a table tblemp with column 'value' of type 'varchar' in that column i have a cell named 'bankname' . I want to make 'bankname' of type nvarchar. How can i do that?
0
votes
3
answers
5k
views
MySQL Convert data VARCHAR to DATETIME
The table users was badly designed.
The created_at and updated_at records were set with the VARCHAR type and the values were placed in them for a long time in the format like 20.10.2017 8:10.
It is ...
0
votes
1
answer
165
views
MSSQL varchar(max) 50 seconds for one record to insert
Hi i have a table with field i need to store a text/json/xml into. If i insert just one record with a length of about 20MByte it takes forever about 50 seconds.
The table is defined like this
table {
...
0
votes
0
answers
57
views
TSQL converting varchar to int - numeric say 1 and I get a point '.' at the end of the varchar?
I am facing a problem with the convertion of a varchar in a numeric value.
I have following SQL Code
DECLARE @Test varchar --f.e. '12345'
DECLARE @TestNum int
.......
IF ISNUMERIC(@Test)=1 then
...
1
vote
1
answer
855
views
Informix cast varchar to byte
How to insert a varchar into byte(blob) column?
Consider i am having a table A with byte(blob) column 'name'.
INSERT into A (name) values('abc');
throwing error as "617: A blob data type must be ...
0
votes
1
answer
344
views
Grails query forcing implicit conversion on string parameters
I am running a simple grails query with a string parameter. When looking at the query that is generated in SQL Server profiler, the query forces an implicit conversion from nvarchar to varchar which ...
7
votes
3
answers
4k
views
EntityFramework is very slow to compare strings because create a nvarchar sqlparameter instead of varchar
I have this sample query:
context.BarcodeTipiDoc.AsQueryable().Where(d => d.Barcode.CompareTo(minBarcode) > 0);
That query runs very slow because Entity Framework creates SqlParameter for "...
2
votes
2
answers
668
views
Indexed VARCHAR's key_len
-- 2 Moderators: please do not re-format my code
DROP TABLE IF EXISTS `t`;
CREATE TABLE `t` (
`v` VARCHAR(3) NOT NULL COLLATE 'latin1_general_ci'
, `c` CHAR(3) NOT NULL COLLATE '...
0
votes
3
answers
2k
views
How to save more than 8000 characters in a SQL column
I have one column AgentName in a table Test which contains more characters. I am getting differences in length as shown below.
If you see "C" , I have copied the output of @TMP and doing DataLength ...
0
votes
0
answers
384
views
MySQL Error 1264 out of range value for Column 'Telnum' at row 1
I'm literally new to SQL, trying to do a little address book as a database, issue I ran into was as described in the title.
My table: creation
CREATE TABLE IF NOT EXISTS mydb.Addr (
idAddr ...
0
votes
0
answers
1k
views
IsNull returns TRUE when inserting empty (NOT NULL) strings in a LONG VARCHAR field (SQL Anywhere)
Delphi 10.3.2 enterprise, database ASA (SQL Anywhere 17.0.9.4913).
I have this table
CREATE TABLE string_null(
lo_key integer NOT NULL DEFAULT AUTOINCREMENT PRIMARY KEY,
str_short char(100) ...
0
votes
1
answer
455
views
How can I change the length of fe_users field in TYPO3 [duplicate]
I'm using TYPO3 9.5. LTS and insert some fe_users.
The TCA input field title is to short for me, only 40 characters. I need more, so the value must be at least 255 characters (varchar).
How can I ...
0
votes
0
answers
649
views
How to get a XML with very large data into a varchar(MAX) variable in MS SQL
In MS SQL, I have large XML data which i want to cast and store it in a varchar(MAX) variable but its not working. when i try to capture the data in varchar variable it is missing some part of the ...
0
votes
2
answers
922
views
unable to update to default values null and empty string for tinyint and varchar fields
I have the following table schema -
CREATE TABLE `tablename` (
`id` bigint(15) NOT NULL AUTO_INCREMENT,
`uuid` varchar(400) NOT NULL,
`pre_notif_action` varchar(30) DEFAULT '',
`...
0
votes
1
answer
703
views
Inputted string must be exactly 10 characters
I am creating a column in postgres that must only accept 10 characters. VARCHAR(10) works in the sense that it allows data to be a maximum of 10 characters, however i cant seem to figure out a way to ...