I have a trigger which declares a table variable. DECLARE @TREarn_aaa table ( aaaID bigint NOT NULL PRIMARY KEY, Bbb decimal (18, 8) NULL, Ccc dec
My SQL Server table looks like this ID a_Toyota a_Mazda a_Nissan a_Kia a_Honda a_Subaru SoldCar CarOrder 1 8000 7000 6200
I would like to do a PIVOT on my table but I don't have aggregation column. SELECT CONVERT(date, DataHora) AS dia, CONVERT(VARCHAR(5), DataHora, 108) A
I have a table of students and classes. I would like to find what classes were dropped from one semester to another (and a similar query for classes added). Stu
I am struggling with the problem with nesting root for every day (it's an element of my table). I'd like to get nested Key: value pair of day from table Day. He
Here is the code of server side i.e of NotificationHub where i intend to add some logic by which i get realtime update from database based on client send value
While trying to run my migrations in a Laravel App I have in an EC2 server, I run into this error message. SQLSTATE[08001]: [Microsoft][ODBC Driver 18 for SQL
I use the layer2 cloud connector to sync between Sharepoint DB (right) and SQL Server database (left). I sync from right to left only. I make a dynamic column o
Write a SELECT statement that returns the LastName, FirstName, and AnnualSalary columns of each instructor that has a unique annual salary. In other words, don
I have a master table and a detail table. Question 1: I would like my view to look like this master1 row, nulls master1 row, detail1 row for master1 master1 row
I have some query in which I am substituting 2 dates in a field "between". SELECT ... FROM ... WHERE o.EventDate between @startDate and @endDate How to make it
I have a table (Table 1) which is a list of employees and data points about them. The data that populated Table 1 is regularly changed and added to in its sourc
Currently, this is the only way I know Create @tempTable1 Insert into @tempTable1 Exec mySP1 input1, input2 Create @tempTable2 Insert into @tempTable2
I have a complex subquery within a query giving me this: Col 1 Col 2 value1 NULL NULL value2 value3 NULL NULL value4 value5 value5 But instead, I need this ou
I'm trying to select multiple values from 3 subqueries and combine them together. But I get the error "Only one expression can be specified in the select list w
Recently, I read an article with the below link and would like to know this property in my SQL server but the result is a kind of weird in my server. http://web
I am trying to export SQL table as multi-character delimited text file in python. I have tried using Pandas, but it is only supporting single character as delim
Currently, the sql code that I have is to check for the three fee_code records do any of them have election_code = NA. I'm trying to figure out how to change th
I am trying to get the resultList to my jsp using tag. public class DBUtil { public String getData()throws SQLException, ClassNotFoundException{
I get this error: System.Data.SqlClient.SqlException: 'Must declare the scalar variable "@refSlips".' Code: SqlConnection con = new SqlConnection(connectionSt