Questions tagged as 'sql-server-2008'

2
answers

Obtain Maximum and minimum of an SQL Calculated query (2 columns). Server 2008

This query is the final part of a store procedure that manages to show me the results in this way: final_comparativo as ( select s.CeEmplazamiento, avg(s.Totales) TotalGeneral , s2.TotGral, @Mes as Mes f...
asked by 06.06.2017 / 23:54
1
answer

SQL - Show date in "Lun dd-mm-yyyy" format

I've searched Stack Overflow but I can not find it. In SQL Sever 2008 I have a table called "tbltemp" with a field called "day", this field is DateTime type. When I consult direct dates on this field, it shows the following: Select day fro...
asked by 18.04.2017 / 21:33
2
answers

How to copy the data of one table from one database into another database with an identical table?

Greetings to all, friends. I have the following problem: I just assumed the administration of an old system which manages 4 databases (different names, identical structure) but the only common table in structure and data is that of Users....
asked by 01.03.2017 / 19:23
1
answer

List all the databases of a server in SQL Server 2008

I try to get a small report of SQL Server 2008. I need to list all the databases created on the server, and include: Name creation date user (the one with db_owner permissions) and size The sp_helpdb gives me certain infor...
asked by 20.04.2017 / 20:55
3
answers

Help with query sql server 2008 pls

I have a table called usuarios which has several fields, one of them is the field estado_usuario which has as parameter 0, means the user is disabled and 1 which means that the user is valid. I need to count the number of curren...
asked by 01.10.2018 / 17:40
2
answers

Show a field considering 10% of another column using SQL Server

I would like you to help me with this query, I want the costs that are greater than 1000 to show me in another column increased to 10%. At the moment I only have: SELECT * FROM tarifa The result is the following: I hope you can...
asked by 22.03.2017 / 23:00
2
answers

Fill selectoption with titles stored in a database

I have a <select> and I want it to show titles that are stored in a database. I have found several forms but none has been useful. If someone can guide me, I would appreciate it: D This is what I have in my application of c # &...
asked by 25.05.2017 / 16:56
1
answer

Help with query on sql server

I have the following question, I need to filter a query on sql server by date range and time range, for this I made the following query: SELECT * FROM AHUMA00016 WHERE Fecha BETWEEN '28/5/18' AND '29/5/18' AND Hora BETWEEN '09:13' AND '09:28'...
asked by 25.08.2018 / 19:11
1
answer

Select values from the XML field in SQL Server 2008

I have a table in SQL that has two fields ( id , xml ), just looking at my XML field, the row is like this: <Sheet1> <Production_x0020_Line>L1B4</Production_x0020_Line> <Item_x0020_Number>VPJG7F-1084...
asked by 06.04.2017 / 16:44
1
answer

ERROR when Creating Table

I have the following Script. USE [PS_GameData] GO /****** Object: Table [dbo].[Guilds] Script Date: 07/24/2018 17:33:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[Guilds]( [R...
asked by 24.07.2018 / 23:58