|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
TSV | |
What is a .tsv file format? | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
Output Parameters I have this simple stored procedure: CREATE OR ALTER PROCEDURE [dbo].[GetAsciiValue] ( @ASCII CHAR(1) output, @input INT ) AS BEGIN IF @input > 32 AND @input < 127 BEGIN SET @ASCII = CHAR (@input); RETURN; END; END; GO I want to call this and get the ASCII value back. I have this test script: DECLARE @val CHAR(1) = ' '; EXEC dbo.GetAsciiValue @val, 42; SELECT @val; This doesn't seem to work to get the ASCII value of the integer passed in. What is the problem? Answer: Add "output" after the parameter in the calling script. Explanation: To get the output value back from a stored procedure, both the stored procedure declaration and the call from T-SQL must use the OUTPUT keyword with the parameter. Ref: Parameters - https://docs.microsoft.com/en-us/sql/relational-databases/stored-procedures/parameters?view=sql-server-ver15 |
Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2017 - Administration |
SQL Server rename - Instead of SQL Server name I am thinking to use dns cname for connection string etc. Would this be possible to setup with named instances? If yes would there be any issues? My understanding is it can cause issues for connecting with SSIS and linked server? |
SQL Server 2017 - Development |
T-SQL code help - Hello! I am designing one query where I have to convert the value from one currency to another. The problem is for I have to calculate a value with following conditions: In that transaction row, if the current row currency (A) is not equal to the posting currency (B) then I will have to go […] |
read value return from URL on page - Hi folks, I have a peculiar problem I am trying to find a solution to. We have developed a process of importing data which requires validating against a web server URL, which returns either a 0 or a specific string on a page. There is nothing else on the page, no graphics, HTML, or CSS, […] |
SQL Server 2016 - Administration |
fn_dump_dblog - Hi All I have been trying to figure out what has caused a spike in the size of a particular log backup. ' I am seeing entries for LOP_MODIFY_COLUMNS & LOP_MODIFY_ROW I found this in attempt to get an understanding... LOP_MODIFY_COLUMNS: Designates that a row was modified as the result of an Update command. LOP_MODIFY_ROW: […] |
AG db Synchronized but not accessible - Hello experts, We have a report of a failed login for an application. The error is like this one: Login failed for user 'sql_login'. Reason: Failed to open the explicitly specified database 'mydatabase'. [CLIENT: ] This database is in an Always On Availability Group. The db is accessible on the secondaries, but not on the […] |
Using Cluster Aware Update - Applying Windows Update to SQL Server part of AG - Is there any official Microsoft documentation around why Cluster aware update cannot be used to patch sql servers that are part of Availability group? I am completely aware of steps needed to patch sql server in AG using different methods. |
SQL Server 2016 - Development and T-SQL |
Problem using While to loop from record - Hello, I have build this While Statment to loop for record based on primary key DOSTAMP for later create an insert statment for each dostamp(In practice, for each document that have this primary key). I do something wrong because some dostamp are repeated on the print test This is my SQL While loop : DECLARE […] |
Administration - SQL Server 2014 |
Database patching on SQL server 2014 reporting services - We have SQL server installed and it is up to date with respect to patching. Recently, we have installed reporting service on the same default instance. Please let me know how we can patch reporting services only. When I tried to apply SP3, I can see the whole instance along with database engine is getting […] |
Camunda & Database - Hi Experts, We are planning to implement camunda BPNM and the SQL server is going to be our production one running all application database. Can anyone enlighten me whether Camunda will be a memory hog and will cause performance issues ? TIA |
SQL Server 2019 - Administration |
BMC Remedy Service Desk Integration with Sailpoint - I am working on a new project and need some information. We are going to integrate sailpoint with BMC Remedy Service desk. we would like to give access to user through Remedy, Where we provide access request and then sailpoint provision them to the defined (groups or entitlements). I would like to get more knowledge […] |
SQL server 2019 installation CU 10 where to upload and install on my server - Hello where can I find to apply latest CU thank you |
sql server 2019 standard edition intallation question - for installation sql server standard edition for instance id should I put server name? lets say I have as 12345inv server name would that work? because by default it goes mssqlserver when i installed wasnt able to log in to the sql serverer so I un installed and not sure how what to put for […] |
SQL Server 2019 - Development |
Help with a query - Hi all! I want to create a stored procedure that returns a result based on the value of some DateTime parameters. Table format is: CREATE TABLE [dbo].[Contracte]( [id] [int] IDENTITY(1,1) NOT NULL, [NrContract] [int] NOT NULL, [DataContract] [datetime] NOT NULL, [idOrganizator] [int] NOT NULL, [idExcursie] [int] NOT NULL, [idUser] [int] NOT NULL, CONSTRAINT [PK_Contracte] PRIMARY […] |
Reporting Services |
SSRS not delivering all reports at the same time. - I have several data driven subscriptions running throughout the day delivering anywhere from 1 to 50+ reports to a file share. On those subscriptions that deliver 30+ reports, randomly it will deliver all but a handful and then deliver the rest when the next subscription runs. I have looked at the Execution logs and see […] |
Connecting |
connect to mdf file of localDB - Potentially dumb question. There is 1 x ldf & 1 x mdf for DB1. LocalDB. How do I connect to these? I am unfamiliar with localDB. If I run [sqllocaldb.exe i] - there are 2 other instances but not those using the log & data files I want to look at. Is there a way […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |