truncate Questions

10

Solved

Access is truncating the data in a couple Memo fields when I am appending an Excel file. The field in the Access table is already set as a Memo type. I believe the problem is that I do not have any...
Hemimorphite asked 6/3, 2013 at 14:20

5

Solved

I have an app with a reasonably long title (e.g. My Long Title App). I am using an ActionBar and noticed the app title keeps being truncated (e.g. My Long Title A...). This happens even though 2 ac...

6

I tried to truncate a table with foreign keys and got the message: "Cannot truncate table because it is being referenced by a FOREIGN KEY constraint". I read a lot of literature about the pro...
Dreeda asked 23/9, 2010 at 7:42

15

Which is the best efficient way to round up a number and then truncate it (remove decimal places after rounding up)? for example if decimal is above 0.5 (that is, 0.6, 0.7, and so on), I want to r...
Proffer asked 19/8, 2013 at 11:54

4

I have a .sql file that clear cached data in a mysql schema before export because the cached data in these tables is useless when I import the export file to a different server. I use this script o...
Mousterian asked 19/8, 2014 at 23:19

16

Solved

Why doesn't a TRUNCATE on mygroup work? Even though I have ON DELETE CASCADE SET I get: ERROR 1701 (42000): Cannot truncate a table referenced in a foreign key constraint (mytest.instance, CONST...
Prohibitionist asked 27/3, 2011 at 21:57

32

Solved

Using MSSQL2005, can I truncate a table with a foreign key constraint if I first truncate the child table (the table with the primary key of the FK relationship)? I know that I can either Use a ...
Health asked 31/10, 2008 at 15:6

33

Solved

What's the difference between TRUNCATE and DELETE in SQL? If your answer is platform specific, please indicate that.
Sihun asked 26/9, 2008 at 13:53

14

Solved

I have a process that's writing a lot of data to stdout, which I'm redirecting to a log file. I'd like to limit the size of the file by occasionally copying the current file to a new name and trunc...
Hearsh asked 11/6, 2009 at 9:55

3

Solved

I'm working on a Bootstrap card using flexbox and can't get text truncation to work. The card text wraps as expected, however, the card title does not truncate when there is not enough space, inste...
Clevelandclevenger asked 29/1, 2020 at 21:58

13

Solved

How do I only get the first 10 words from a string?
Slusher asked 10/5, 2011 at 21:20

15

When a float number needs to be truncated to a certain digit after the floating point, it turns out that it is not easy to be done. For example if the truncating has to be done to second digit afte...
Donothing asked 12/1, 2011 at 12:11

4

Solved

I've been adding some new css to an existing project (using media="print") in the page header. It's going smooth and (for once!) IE is giving nice, expected results, but Firefox does not... The pr...
Prig asked 7/9, 2011 at 15:36

5

I am trying to write a Unix script which will truncate/empty a file which is continuously being written/open by an application when it reaches say 3GB of space. I know that the below command would ...
Bigener asked 27/11, 2012 at 0:23

7

Solved

How do I truncate a java String so that I know it will fit in a given number of bytes storage once it is UTF-8 encoded?
Foofaraw asked 23/9, 2008 at 6:3

11

Let's say we have table Sales with 30 columns and 500,000 rows. I would like to delete 400,000 in the table (those where "toDelete='1'"). But I have a few constraints : the table is read / writt...
Goforth asked 27/6, 2012 at 15:48

38

Solved

I would like to truncate a string such that its length is not longer than a given value. I am writing to a database table and want to ensure that the values I write meet the constraint of the colum...
Robena asked 5/5, 2010 at 20:50

3

I have R version 4.1.2 (2021-11-01). It seems trunc() function is not consistent when the input number has a large number of decimal values. trunc(3.99999999999999977799999999999999999999900) [1] 4...
Pickup asked 4/4, 2023 at 14:27

4

Solved

I have been trying to limit my blog content text with str_limit that works fine until I apply limit of characters on it. kindly see what is missing in the code of my blade file: {!! str_limit($blo...
Bewail asked 29/6, 2018 at 6:29

4

Solved

I'm using Python standard logging module with custom formatter where I limit length of some fields. It uses standard % Python operator. I can apply limit for percent-formatted string like this (t...
Plunder asked 23/10, 2014 at 15:40

3

Solved

Can the SQL "truncate table" command be used within a transaction? I am creating an app and my table has a ton of records. I want to delete all the records, but if the app fails I was to rollback m...
Hallerson asked 5/10, 2009 at 23:36

16

Solved

I have a file, foo.txt, containing the following lines: a b c I want a simple command that results in the contents of foo.txt being: a b
Oared asked 3/2, 2011 at 1:45

9

Solved

To empty a database table, I use this SQL Query: TRUNCATE TABLE `books` How to I truncate a table using Django's models and ORM? I've tried this, but it doesn't work: Book.objects.truncate() ...
Claraclarabella asked 7/6, 2010 at 11:24

3

Solved

I've created a view which uses GROUP_CONCAT to concatenate results from a query on products column with data type of 'varchar(7) utf8_general_ci' in a column named concat_products. The problem is t...
Hatchway asked 17/8, 2012 at 7:55

14

Solved

What's the best way to truncate a datetime value (as to remove hours minutes and seconds) in SQL Server? For example: declare @SomeDate datetime = '2009-05-28 16:30:22' select trunc_date(@SomeDate)...
Cog asked 28/5, 2009 at 21:28

© 2022 - 2025 — McMap. All rights reserved.