tsql
T-SQL if value exists use it other wise use the value before
I have the following table -----Account#----Period-----Balance 12345---------200901-----$11554 12345---------200902-----$4353[详细]
2023-04-13 08:13 分类:问答Find which parameters of stored procedures are nullable (optional)
I know I can use the following query to find all stored procedures and thei开发者_运维问答r parameters :[详细]
2023-04-13 07:29 分类:问答asp.net parameter update reports 1 row updated but no data in table added
I am getting an incorrect repsonse after an update to a table. In my RowUpdating event I have the following code which builds an Update Parameter to call an SP to update a table. I must be doing somet[详细]
2023-04-13 07:16 分类:问答Running queries against multiple servers?
I am not sure what the best design pattern for this problem is so any suggestions would be greatly appreciated. I have two SQL Servers A (with DBs P,Q,R) and B (with DBs X,Y,Z).[详细]
2023-04-13 07:03 分类:问答Assign case statement result to variable
When I try to run the following statement, I get this error: \"A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations.\"[详细]
2023-04-13 06:51 分类:问答need a simple query in t-sql
I have a query that I have simplified for 开发者_StackOverflow社区our purpose. How do you achieve this result ?[详细]
2023-04-13 06:35 分类:问答How to get table name back in column name of joined tables
I hve the query... select * from Contact c left join Employee e on c.ContactID=e.ContactID left join [Role] r on e.EmployeeID=r.Employee开发者_Python百科ID[详细]
2023-04-13 06:24 分类:问答How do I avoid getting duplicate information?
I have two tables... CustomerId, Name 1pete 2dave 3jon CustomerId, Role 11 12 21 32 33 And I want the select to return data in the following format[详细]
2023-04-13 06:18 分类:问答"not exist" does not display results?
SELECT a.samAccountName FROMactiveIds AS a WHERENOT EXISTS (SELECT * FROM#tmp1 AS b WHEREa.samAccountName = b.userID)[详细]
2023-04-13 06:11 分类:问答Rows locking when running update statement in production
I\'m wondering what is the correct solution to the below is. I have an UPDATE statement in T-SQL that needs to be run as a daily task. The procedure will update one bit column in one table. Rows affe[详细]
2023-04-13 05:48 分类:问答