Questions tagged [format]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
29 views

How to add 6 hours on MSSQL with format

I am currently using SELECT FORMAT (getdate(), 'MM/dd/yyyy, hh:mm:ss tt') as date The output is in the format I need, but is off by 6 hours. 05/30/2019, 06:26:01 PM I just need to add 6 hours ...
0
votes
0answers
9 views

Access into Excel - Format Issues

I have a query in access which contains some columns in a duration format hh:mm:ss, in access the format is correct and shows correctly. However when imported to Excel they all revert to 00:00:00 and ...
0
votes
1answer
190 views

Format for recording RGB color in MySQL [closed]

React client is sending color to my server with this format {"r":1 "g":8 "b":5 "a":2}, for instance. I'm not sure what is the best way to record color in MySQL. I don't want to use this data in ...
0
votes
2answers
791 views

How to change the SQL Server Backup file (.bak) file default icon?

As I would like to say that by mistake the SQL Server 2012 backup file (.bak) open with wordpad. Due to this reason all backup files of SQL Server (.bak) file change with wordpad icon in entire the ...
1
vote
2answers
337 views

Update selected data from same table column as currency

I am trying to update selected data from a table column and format this data as currency. My table column holds strings that have both mixed whole numbers and already formatted data. This was due to ...
0
votes
1answer
546 views

Is there a way in sqlite3 to set .width of all columns to be equal to the width of the column header?

I am using: SQLite version 3.21.0 I look for away to prettify my SQLite SELECT shell output (to make it more human readable, in essence). This answer helped me a lot. Though, now I am wondering if ...
7
votes
1answer
696 views

Does lightweight pooling disable built-in CLR facilities?

Running SQL Server in fibre mode (lightweight pooling) disables the use of SQL CLR: Common language runtime (CLR) execution is not supported under lightweight pooling. Disable one of two options: "...
0
votes
1answer
42 views

Txt format from Bank

I'm working on a service that allows users to store data from the bank, but banks give me their account statements in different formats, one of them is the following 68520157286 ...
5
votes
1answer
398 views

Getting year DATEPART from Unix date

In my database, the dates are retained as days elapsed since/before 01/01/1970, which I understand to be a Unix date format, eg. today is 23rd May 2018 and the value is 17674. I'm trying to run a ...
0
votes
1answer
79 views

What format is this export of election data in?

I have a series of files I've downloaded from the Texas Ethics Commission (a misnamed . You can see an example of their layout in the ReadMe.txt. I've made an etl library which processes the ReadMe....
5
votes
2answers
1k views

Match phone numbers efficiently

For a mobile application we are considering validating a user based on their mobile phone number. In the app we will restrict the user input so that it will be stored in the following format: +...
2
votes
1answer
1k views

How to store international phone numbers in PostgreSQL? [duplicate]

What is the correct way to store phone number data after applying a new mask for user input (example for UK; 44 07400 123456) if the type of the existing column is character varying(32)? Does storing ...
0
votes
1answer
611 views

Can't get my SQL query to filter by dates like I want

I have a query where I want to exclude rows if a date column has any one of a set of dates. I am having trouble figuring how to return the correct result sets without filtering one month at a time. ...
4
votes
1answer
1k views

PostgreSQL: Cast any boolean field to integer in SELECT * query [closed]

In PostgreSQL, I can cast individual boolean fields to integer when I want to get 0/1 output instead of f/t. SELECT some, thing, mybool::integer FROM mytable; But is there a way to ask PostgreSQL to ...
0
votes
1answer
1k views

Field Terminator Problem in Format Files

I have a data file in txt format and I used to load it with Bulk Insert in the following command: Bulk insert [table1] FROM 'data.txt' WITH ( FIELDTERMINATOR ='|', ROWTERMINATOR ='...
1
vote
2answers
2k views

Differences between .dump and .sql in pg_dump PostgreSQL

I'm trying to take a backup of schema using pg_dump like, $ pg_dump -U ganapathy -n hotel_management > ganapathy_schema.dump It create the backup, But I can't restore it using pg_restore. It give ...
1
vote
1answer
34 views

Concatenating Strings & Using FORMAT Together - NOT WORKING

I'm literally pulling my hair out trying to use the FORMAT function to format a date into a simple string. Please someone pull the pin and tell me what stupid thing I'm missing! Works: SELECT TOP ...
1
vote
2answers
2k views

Why does formatting a time with AM/PM specifier return null?

I have a query where a formatted expression is returning null: declare @FormatString nvarchar(max) = N'hh:mm tt' select M_STARTTIME as [Memo Time 1] , convert(time,M_STARTTIME) as [Memo Time 2] ...
6
votes
2answers
10k views

Insert custom header row in BCP output

Long story short we have a database here that manages some employee data such as email, first name, last name, etc. Our company bought into this SAP Based expense report system :| that needs an ...
11
votes
1answer
408 views

How to export the output of sp_AskBrent?

We have an instance that randomly spikes the CPU. I want to create an alert that fires on CPU over 90% and automatically calls a job that runs sp_AskBrent and emails me the output. However, the output ...
2
votes
1answer
3k views

Query result in a daily date from a date range selection Postgres 9.3

I need to make a report that will output a result in a daily row result based on the datarange selected. Example: Table: sales ->id ->type ->gross ->created_at ->updated_at For ...
3
votes
2answers
61k views

How to format sql-plus-spool-file to *.csv with all columns in one line and row-content with linebreaks as one field?

I am not a professional, sorry. But perhaps you can help me anyway ... I have a table with 27 columns and within the rows data with linebreaks. When I try to export selected rows with sql-plus spool,...
1
vote
0answers
341 views

Does Postgres have a function for converting text into ASCII escaped or HTML escaped text?

Is there a builtin Postgres function that converts multi-line text into ASCII escaped or HTML escaped form and vice versa? I need to store multi-line text as name=value pairs, basically line .ini ...
0
votes
1answer
475 views

Does PostgreSQL have a built in option for converting multi-line text to single line?

Does PostgreSQL have a built in option for converting multi-line text to single line? I need to store multiline text as Name=Value pairs, basically line .ini files, but need to convert Value back to ...
2
votes
3answers
1k views

How to select different format of the date in mysql

0 down vote favorite. I have this table and I can't change its format to yyyy-mm-dd because I have so many scripts that are related to this format dd-mm-yyyy. It would be a mess if I change its ...
1
vote
1answer
500 views

Date format on the output of cmdshell dir C:\ /TC

I would like to ask you guys if anyone of you had this trouble before. In SQL I read the create time of the file like exec master.dbo.xp_cmdshell 'dir C:\ /TC' which gives me; 07/14/2009 04:20 ...
3
votes
1answer
927 views

Improve select query performance

The following select query from my application is taking more than 200ms. The table has around 2 million rows. Is there any ways to improve the performance of this query ? select count(id) from ...
0
votes
0answers
33 views

loading k:v pairs from DB into JS Object

I'm creating a single player web RPG. I'm debating the following method of storing/retrieving quest items per player id: In userstats table, have a quest_items column of type mediumtext, where I ...
0
votes
1answer
529 views

How to interpret and modify a dBase (.dbf) file?

I'm working with dBASE (.dbf) files for a project using a GIS software because it seems that they are more efficient. I've converted several .xml files to .dbf with OpenOffice 3.4 and loaded into the ...
0
votes
1answer
963 views

SQL output formatting

I want this: "ACCOUNT_ID","MAJOR_VERSION","MINOR_VERSION","COUNTRY","ACCEPTANCE_TIMESTAMP","AGREEMENT_ID" "abcdefgh-1234-5678-ijkl-mnopqrstuvwx","20110901","1","CN","1329574013737","tos" But I get ...
3
votes
2answers
1k views

SQL*Plus default output format

I have noticed that using the same SQL*Plus client to connect to different Oracle database result in different outputs for the same SQL query. Database 1: C:\Oracle\instantclient_10_2>sqlplus ...
5
votes
3answers
10k views

How to get SQL Server 2012 to use the invariant culture in format()?

This has now been posted to Connect: The invariant culture identifier is rejected by the FORMAT() function in SQL Server 2012. (Connect has been retired.) This has now been posted to feedback.azure....