Questions tagged [varcharmax]

The maximum count of type varchar

The maximum count of type varchar. A varchar or Variable Character Field is a set of character data of indeterminate length. The term varchar refers to a data of a field (or column) in a database management system. Varchar fields can be of any size up to a limit, which varies by databases: an Oracle 9i database has a limit of 4000 bytes, a MySQL database has a limit of 65,535 bytes (for the entire row) and Microsoft SQL Server 2005 has a limit of 8000 bytes (unless varchar(max) is used, which has a maximum storage capacity of 2 gigabytes).

71 questions
2
votes
2 answers

How do I use Varchar(max) output from a SQL Server 2008 stored procedure in an old ASP/VBScript app?

Here's the sproc: ALTER PROC [dbo].[cms_createNoteMultipleRecID] ( @NoteDt smalldatetime, ... @NoteIDCSV VARCHAR(max) OUTPUT ) And here's the VBScript: cmd.CommandText = "cms_createNoteMultipleRecID" cmd.Parameters.Append =…
alphadogg
  • 12,762
  • 9
  • 54
  • 88
2
votes
0 answers

SQL query containing varchar(max) VERY slow with ORDER BY

A table with 20 columns (ints, bools and varchar(50)'s) retrieve is very slow because of one column with the type of varchar(max). The table has 680 rows, and i 'm retrieving max 5 or 6 results. For some reason the select statement is very slow if…
stephan
  • 61
  • 8
2
votes
1 answer

converting varchar(n) to varchar(max) on mssql2008

I have a table which has about 8,000 rows and I wanna change a column from varchar(1000) to varchar(max) I typed alter table TABLENAME alter column COLUMNNAME varchar(MAX) and it didn't work. How can I change the data type of the column? Or do I…
Dahye Baek
  • 23
  • 3
2
votes
2 answers

Can't read data from varchar(max) using ADODB

I've got a method that uses ADODB to execute a sproc and read the results as a recordset. Everything was working fine until i changed one of the output fields from varchar(2000) to varchar(max) (SQL2008). Now I can't read the data from that field. …
Brad Irby
  • 2,397
  • 1
  • 16
  • 26
2
votes
4 answers

How can I insert more than 8000 characters in a VARCHAR(MAX) column with ExecuteNonQuery?

I am trying to insert > 8000 characters (submit from a web page) via ExecuteNonQuery (and DatabaseFactory.CreateDatabase() from MS Practices Enterprise Library). The stored procedure defines the parameter as VARCHAR(MAX). The column is VARCHAR(MAX).…
2
votes
0 answers

VARCHAR(MAX) and > 8000 bytes / ExecuteNonQuery

Possible Duplicate: VARCHAR(MAX) and > 8000 bytes / ExecuteNonQuery (repost) I am trying to insert > 8000 characters (submit from a web page) via ExecuteNonQuery. The stored procedure defines the parameter as VARCHAR(MAX). The column is…
1
vote
3 answers

SQL Server Text datatype or Varchar(max) creates databases that are too large

When I use SQL Server Text or Varchar(max) datatype in a column it creates databases that are too large : for example 1000 rows in one table containing varchar(max) use around 1000 Mb (1Gb) !!!! Is that normal ? thanks for help Edit my text fields…
riadh gomri
  • 869
  • 1
  • 15
  • 21
1
vote
0 answers

Problem doing left join on varchar on csv imported data

I am importing some data from a CSV with the intention of then doing a lookup on one of the column names to get their location from another table (we're having to do it by name rather than an ID as we aren't provided with one unfortunately from the…
1
vote
1 answer

TypeError: predict() missing 1 required positional argument: 'params' while Predicting values in ARMAX model

This is my code where I am fitting the model model_armax = ARIMA(df.productivity, exog = df[['calories_burnt', 'fat_level', 'distance_walked', 'steps', 'weight', 'water', 'time_to_bed',…
1
vote
0 answers

T-SQL VARCHAR(MAX) Truncated - Not Display Issue

I am trying to send my table data to a local directory xml file. I have created a SQL Agent job that runs a sql script file and sends the data to the output file with the following command: sqlcmd -d Migration -E -h-1 -W -i…
VLo88
  • 51
  • 6
1
vote
0 answers

VARCHAR(MAX) not accomodating full string

I have a varchar(max) defined but it is truncating the string. I have searched for the solution and found that all the new values assigned or appended to the string should be cast to varchar(max) but it still didn't help. Here is my code: DECLARE…
Pawan Nogariya
  • 8,330
  • 12
  • 52
  • 105
1
vote
0 answers

Convert Oracle CLOB column into Microsoft SQL varchar max

I have been asked for my current project to convert our existing Oracle database into a Microsoft SQL database. I have no problem for most of the data but I am having problems with a specific column. I have a table with a CLOB column and with around…
Triple
  • 11
  • 2
1
vote
1 answer

MS SQL Server EncryptByKey - String or binary data would be truncated

In theory varchar(max) and varbinary(max) columns should be capable of storing up to 2GB of data but I cannot store a unicode string 5000 characters long. I've looked through other questions on this topic and they all suggest checking column sizes.…
naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259
1
vote
0 answers

Passing a very long string parameter to sql server stored procedure

I need to pass a very long string parameter from C# to MSSQL server stored procedure via entity framework. For this, Im thinking to use VARCHAR(MAX) as the input parameter type of the stored procedure. and I found that VARCHAR(MAX) supports up to…
BUDDHIKA
  • 306
  • 2
  • 8
  • 23
1
vote
1 answer

How to generate a varchar(max) column in SQL Server with JPA EclipseLink

I'm having some thoubles with a generated column 'Text' type, in SQL Server. Same class anotations work fine when using PostgreSQL. I tried: @Lob @Column(name = Columns.largeJsonText) protected String largeJsonText; and this: @Lob @Column(name =…