bst365体育投注网址大全

Questions tagged [sql-server]

Microsoft SQL Server is a relational database management system (RDBMS). Use this tag for all SQL Server editions including Compact, Express, Azure, Fast-track, APS (formerly PDW) and Azure SQL DW. Do not use this tag for other types of DBMS (MySQL, PostgreSQL, Oracle, etc.). Do not use this tag for issues on software and mobile development, unless it is directly related to the database.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

Convert a SQL query to lambda expression

SQL query: SELECT M.MailItemId, m.Subject, ISNULL(m.SendCC, ''), ISNULL(attachment.counter, 0) Counters, M.CreationDate FROM MailItem AS M LEFT OUTER JOIN (SELECT ...
0
votes
1answer
20 views

How to solve maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)

I am facing maximum store procedure, function trigger, or view nesting level exceeded. Here I want to find data on the base of fromdate and todate. My problem arises that I'm trying to convert one ...
0
votes
0answers
14 views

How to properly use LIKE and '%%' in python to search a database list for a partial response stored in a placeholder variable?

search = request.form.get("search") book = db.execute("SELECT * FROM books WHERE title = :search OR author = :search OR isbn = :search OR title LIKE :search",{"search": ...
-1
votes
1answer
19 views

using fetch and json in same query

Trying to use the following in the same query but server throwing syntax error SELECT ( SELECT * FROM myTable FOR JSON AUTO, INCLUDE_NULL_VALUES ...
2
votes
0answers
23 views

Compare data between 2 different source

I have a two datasets coming from 2 sources and i have to compare and find the mismatches. One from excel and other from Datawarehouse. From excel Source_Excel +-----+-------+------------+----------+ |...
1
vote
0answers
26 views

INSERTing files into a SQL Server varbinary field causes the entire table to lock

I've inherited a VB.NET application that INSERTs files into a varBinary(max) in SQL Server using System.Data.SqlClient. It creates a transaction, uses SQLCommand to INSERT the record, then UPDATES ...
0
votes
0answers
17 views

How To Sync data from MySQL to Microsoft SQL server?

i have MySQL table and i want to sync its data to same table but in SQL server any idea? i have tried linked server but it works only from SQL server to insert into MySQL and i couldn't create trigger ...
0
votes
2answers
21 views

Max of count in groupby and join

Hackers table hacker_id Name 1 H1 2 H2 3 H3 Challenges table hacker_id challenge_id 1 C11 1 C12 2 C21 1 C13 ...
0
votes
1answer
37 views

using HASHBYTES function to hash data

I have data I need to hash. I have list of numbers to compare for hashed numbers. as far as someone could tell me, the data was hashed with SHA_256 I have only one example for input and output and I ...
-1
votes
2answers
33 views

How to delete rows one by one so that the trigger doesn't throw an error

I have a trigger that when a row is deleted in InvoiceDetails the row gets copied to InvoiceDetailsHistory. When I execute the sql "DELETE FROM InvoiceDetails " I get an error that says: ...
0
votes
1answer
33 views

Find all possible joins in one schema?

Can I find all possible joins in one schema? For example up to level 2, 3 and 4. I can do something like this: *;with combination as ( select distinct rn = DENSE_RANK() over (order by table_name), ...
0
votes
1answer
26 views

Exec Sp_recompile sp_name is not helpful [closed]

While declaring a script it is working within one minute, but if you try with Exec sp_name profile caught sp it is taking hours of time and continuing. Tried exec sp_recomple 'sp_Name' but that's not ...
0
votes
0answers
17 views

Microsoft SQL Server Management Studio — asking for user input [closed]

Is there a way to search a table based on a user's input? I tried to google it, but I couldn't figure out a way to do it that made sense to me. I'm a beginner to SQL :(
0
votes
3answers
44 views

Optimize SQL Query (If possible) using CONVERT(INT, SUBSTRING( and LEN FUNCTION

My situation is like that : I have these tables: CREATE TABLE [dbo].[HeaderResultPulser] ( [Id] BIGINT IDENTITY (1, 1) NOT NULL, [ReportNumber] CHAR(255) NOT NULL,...
0
votes
1answer
17 views

get last inserted primary key of type varchar in sql server

i have two table userGold and AspNetUserRoles(UserId,RoleId) . primary key type of UserGold is nvarchar(450) same for AspNetUserRole. my problem is that i want to get the last inserted primary key in ...

15 30 50 per page
1
2 3 4 5
19202