Questions tagged as 'sql-server-2005'

4
answers

Calculate Total Hours, identifying equal time intervals

After breaking my head a little, I ask you to help me in the following situation: I have a problem in SQL (Sql Server 2005) of time calculation; Basically I have to calculate the sum of hours worked on technical drives. The issue is that a...
asked by 06.03.2015 / 15:41
2
answers

SQL Server 2005 and row versioning

In my current scenario, every Friday, I need to list all rows in a table that have been added or changed. In this table we have a DataDeInclusao field that obviously receives the date of inclusion of that record. My problem is to li...
asked by 16.04.2014 / 16:04
3
answers

Calculate the average between 3 dates directly in sqlserver database?

What is the most efficient way to calculate the average of dates in the same column by sqlserver bank? I need to get the date of the last 3 sales of a customer, and return in days to know if that customer buys, for example, every 30 days, 60 in...
asked by 13.08.2015 / 21:33
3
answers

Handle String in JAVA?

I have a query of SQL that the content brings me like this: [email protected];[email protected] I need only the first address, I have to disregard everything that is from ; ?     
asked by 03.04.2017 / 20:35
1
answer

Error creating database in SQL Server 2005 with compressed disk

When I try to create a database, the following error occurs:    TITLE: Microsoft SQL Server Management Studio Express       Create failed for Database 'baseded'. (Microsoft.SqlServer.Express.Smo)       For help, click: link       ADDITIO...
asked by 05.03.2014 / 13:39
1
answer

VFP - SQLEXEC is returning DATE field as CHAR

I'm supporting a "legacy" application written in VFP, which uses DBF tables and is now migrating to SQL Server. I created a table of tests in SQL, which contains fields of some basic types, to be able to work with the migration, performing te...
asked by 25.08.2014 / 20:24
0
answers

How to display decimals only when they exist?

How could I do so that in my select the numbers would appear without decimal place when they are 00 and the decimal places appeared when they are different from zero. Example: I have 5 numbers returning like this: 16.00; 10.00; 3.14; 5.00; 13...
asked by 14.06.2017 / 23:15