sql-server's questions - Finnish 1answer

0 sql-server questions.

I'll provide some background for my problem prior to jumping into what's going on to hopefully provide some insight into what I'm trying to do. Then I'll go into the actual issue I'm having. ...

I realize that comparing NULL to any other value (including NULL) will always result in false. DECLARE @IsSet bit = NULL; SELECT IIF(@IsSet = 1, 'true', 'false') SELECT IIF(@IsSet != 1, 'true', '...

Can anyone help with an expression to alternate the colors between records under 'Service'. The report is GROUPED BY 'Service'. I have tried =IIF(RowNumber(Nothing) Mod 2, "Silver", "White") ...

I have a query where I stored information about each product sold in each order, but I want to retrieve top 10 orders with the total max price of products sells. I've executed a SELECT statement to ...

Greetings I have this table Evaluation.Grade with these records: Name Percentage --------------- B 40 C 20 A 20 D 10 A+ 10 And i am storing my given data after ...

I am using OPENQUERY through an ODBC connection to insert records from SQL server to Postgres. But it's very slow - a few minutes for 10000 records. Also, SQL Server Service crashes when amount of ...

I have a database with two tables, Transactions and Customer. The Transaction table has transaction dates, Customer ID, and other transaction information. The customer table has Customer ID and other ...

I've looked around and can't seem to find anything that answers this specific question. What is the simplest way to move data from an MS SQL Server 2005 DB to a Postgres install (8.x)? I've looked ...

I have three tables: Customer, Sales, Detail Customer table columns: CustomerID, CustomerName Sales table columns: Date, Invoice, CustomerID Detail table columns: Invoice, ItemID, Quantity Customer ...

I need to write a SQL Stored Procedure which returns UTC time when we give a date and time along with another time zone. for e.g. I will give input as @TimeZone='IST and @Time='2018-06-18 17:08:31....

I could use your help on this. I am running a SP in SQL 2008R where I import data into an Excel worksheet. I am able to import the information I need just fine except for the order of the output. This ...

Service Order Type Group project type Reporting Family Scale Location RassStage value1 NEW PM CIP 5 Onshore 0. Order Creation 25/06/2015 NEW PM CIP 5 Onshore 1. Order Entry (...

We have the need to sync an Azure SQL Database (PaaS) with a SQL Server on-premises instance (on customer’s DataCenter), as both are being fed with data from different systems. Both databases share ...

I have a table with payments made by customers, I want to return the latest 3 payments for each and every user. If a new customer has only made one purchase then only show one. If a customer has made ...

The Database I am using is Microsoft SQL Server 2016 and its on a different machine. I am using SQL Server 2016 Report Builder (14.0.344.82). I create a new report. Then I create a Data Source. ...

I want to update my column CODE_DEST with an incremental number. I have: CODE_DEST RS_NOM null qsdf null sdfqsdfqsdf null qsdfqsdf I would like to update it to be: CODE_DEST ...

I try to store more then 8000 rows with more then 30 columns in sql server using php uploaded via excel sheet , but when I check the registration in sql server I found that some row wasn't stored . Is ...

The detail row in my table contains a column with an expression: =sum(Fields!one.Value) / sum(Fields!two.Value) I want to sum that column, but the results I get are not the sum of the ratios, but ...

If I execute the code below: with temp as ( select 'Test' as name UNION ALL select 'TEST' UNION ALL select 'test' UNION ALL select 'tester' UNION ALL select 'tester' ) SELECT name, ...

I am new to visual studio and would like to query the SQL in aspx.net. I have the query already in Microsoft SQL but I would like to display them in cshtml pages. SELECT ["IATA"], ["MonthYear"...

im using sql server management studio and im trying to create a trigger that prevents dropping of views and creates a separate error log table that stores the details: user, date/time,attempt type and ...

I tried finding the answer, but maybe I am too new to MSSQL, I come from MySQL, so this is my question super simplified to go straight to the point: Imagine we have a table "Things" Thingie | Value --...

I need help with the following. I am trying in 2 ways. Both did not work. No rows updated. The same sql works without the loop (for a single string). But I want to execute the same sql for multiple ...

I've been trying work through this query, but I cannot seem to find an answer specific to my question. There is a lot of information out there surrounding my question, but I cannot find a post that ...

I have a lot of comparisons that I need to make between a value and its previous value. For Example: ReceivedBy and PreviousReceivedBy. I started with: WHERE ReceivedBy != PreviousReceivedBy But ...

I have 60k rows in an Excel spreadsheet, how to insert one row per hour into a SQL Server table using a SSIS package? Please help me. TIA

Let's say I have a table with 5 columns, some data with 4 columns, and a format file that specifies where bcp should write that 4-column data (obviously one column will be unused). Is there any way ...

I'm trying to do some transformations on a large data set that I'm working on and was hoping for a bit of assistance on a particular grouping. I have a series of records that follow a pattern similar ...

Suppose I have 2 tables, Products and ProductCategories. Both tables have relationship on CategoryId. And this is the query. SELECT p.ProductId, p.Name, c.CategoryId, c.Name AS Category FROM Products ...

Need help with sql sp. I will be calling this sp from vbscript with two table names table1 id f-name l_name phone 1 john smith 111-111-1111 2 john doe 222-222-2222 3 peter Wu 333-...

Ok, so I have a table Building which includes all Persons in that building. However each Person has a profession which is a entity in itself that is added to the Person entity depending what is ...

I am trying to perform SQL-language functions on Python Dataframes as if they were tables in Microsoft SQL Server. Seraching around, it appears that R has the module sqldf, and Python has some record ...

I am using an update query as follows: UPDATE PeopleTable SET firstname = CAST(REPLACE(CAST(firstname as nvarchar(max)), 'John', 'ReplacedFirstName') as next) I would like to do the same for ...

In Oracle, if I want to select all columns of the most recent entries for all ID's (based on a timestamp column), I can do something like this: SELECT * FROM TABLE1 WHERE (TIMESTAMP,ID) IN (SELECT ...

I am trying to replicate this behavior in SQL Server 2014. I have total dollars being worked per month, but I want a new column that takes the dollars and sums it by the current and next 2 months and ...

Does anyone have an idea what this error means or how to solve it? I am using Access 2003 and SQL2005. It comes up when trying to add a record on a particular subform. [Microsoft][SQL Native Client] ...

I am new to SQL Server and have a problem with an insert statement. I am to convert an old database to a SQL server relational database. I am transferring the old data into new tables. The old ...

I'm trying to run the following query, where the id is the primary key. The F from 425F is underlined red and the following error is shown: Incorrect syntax near 'f'. Does anybody know what's ...

I would like to ask for help regarding how to do a partial string comparison of two address values stored in two separate columns. I need to only identify the values that match even if the match is ...

I am writing a case statement to return true or false if a record is returned in my query. A lot number is returned it is True and when no lot number returned it is false. I keep getting just a ...

How can I get the resultset when still running a select query. It can be simulated running a select query on SQL Server Management Studio, the resultset will be displayed when query still running. ...

I created a table using the create table command but it does not show up in the object explorer. I have tried refreshing both the explorer and IntelliSense but it still does not show up. The table is ...

Our application is randomly experiencing outages. I know there are plenty of threads here with the same issue, but I believe what we may be experiencing is different. When looking through the server's ...

I want to make a web server, and to store the data I want to use MSSQL server, I have a working code, used many times before, but if I want to use with tomcat, it doesn't work. public class ...

I seem to have an issue with an SQL agent job that is being invoked by a user, but not executed by the sql agent job user. which the error message, states, but what is the issue? why is that a ...

Given the following table T: ------------------------------ | Person | PermissionTypeId | ------------------------------ | Jon | 1 | ------------------------------ | Jon | ...

I have the below script which is in a semi-working state. I have been able to successfully retrieve all the parent elements, but I want to cursor through those to get all their children. When I try ...

Before anything, I believe I am posting this in the right location, if I am not please point me to the right place and I will delete this question and repost there. I am creating a news feed. This ...

When I try to access my new SQL Server 2016 from the Server Explorer of Visual Studio 2008, I get an error saying my version of SQL Server is not supported. Is there a patch for this, or do I have ...

Trying to build an application that loads files from a source directory into a SQL Server database table. Each file could be up to 4MB, the load from the file to the table will be inserts only, these ...

Related tags

Hot questions

Language

Popular Tags