The tag has no usage guidance.

learn more… | top users | synonyms

5
votes
2answers
120 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 ...
10
votes
1answer
190 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 ...
1
vote
2answers
123 views

Format column length in output - SSMS

SQL Server 2012. Sample query at bottom. I'm trying to create a simple report for when a given database was last backed up. When executing the query at bottom with output to text in SSMS, the ...
0
votes
0answers
11 views

Formatting JSONB query result on psql

How to beautify result of psql on JSONB data type? for example, currently: SELECT data FROM course_classes WHERE id = 20621; using expanded output or \x still unreadable {"room_id": 699, ...
2
votes
1answer
50 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 ...
4
votes
0answers
160 views

How to format T-SQL identifiers in camel case

A number of tools exist which are designed to facilitate formatting the T-SQL in an inherited script or stored procedure to match one's personal preferences. One feature I would like to see in such ...
2
votes
1answer
16k 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 ...
1
vote
0answers
144 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
204 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 ...
1
vote
2answers
342 views

How to select different format of the date in mysql

0 down vote favorite i have this table and i cant 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 iam gonna change ...
1
vote
1answer
163 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 ...
2
votes
1answer
412 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
26 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
139 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
709 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
722 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 ...
3
votes
1answer
3k 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. I'm trying to get the built-in format() function in SQL Server ...