text
stringlengths
209
10.7k
<s>[INST]Display Whole Days of month? I want to Display whole month Days ,whether data exit or not between given Date range. CREATE TABLE #ItemMasterFile(CodeItem INT,Descriptionitem VARCHAR(50),weight int); CREATE TABLE #Probale(BID INT,CodeItem INT,prdQTY INT,Orderno int,weight int,Entrydate date,D...
<s>[INST]Ways on inserting data using stored procedure when TableName is dynamic Hi I have got a C# application that inserts data to different tables in the database, the table names are set dynamically, even the tables are created dynamically using stored procedure( which I managed to do). The table columns are f...
<s>[INST]Get SQL jobs list along with SQL scripts which is used in job HI Team, Is their any option to get the SQL jobs list along with SQL scripts which is used in job. Please help on same.[/INST]USE [msdb]; GO SELECT j.[name] AS [Job Name], s.[step_name] AS [Step_Name], s.[...
<s>[INST]What is the Polybase Architecture? Hi, I recently connected MS SQL Community 2019 with a local Oracle 19c database using Polybase. Polybase seems really insistent on using "Create External Table" to get access to the external database. So do I have to Create External Table for every foreign table I want t...
<s>[INST]incorrect syntax near "server name\instance" expecting '(' or select I am still trying to learn/teach myself sql. I am adjusting a SCOM dashboard but 1 query gives an error. I am not sure why. I asked my DBA and he said for me to ask google. I get incorrect syntax near "server name\\instance" expecting '(' or ...
<s>[INST]Add two digit to first of another digits I have some tables in SQL and I want to add two digit (the two digit is a fixed number that is 13 ) to the first of all numbers in a some columns. I used this script but unfortunately it doesn't work accurately: for example I want to change 991105 to 13991105. ...
<s>[INST]Enabling TDE encryption for 1000 databases together Hi Team, I want to create a SQL script to enable TDE encryption for 100 databases together , by checking if is_encrypted field if 0 from dmv sys.dm_database_encryption_keys, then enable TDE. Regards,[/INST]This is something you could work from: ...
<s>[INST]Upgrade server Sql Server 2014 from Standard to Enterprise with Mirroing Hi everyone! I need some advise for solve next task: I have configured and fully worked Mirroring on MS SQLServer 2014 Standard Eddition. In last time i see what my APPS generate 100% overload Load CPU. On Server set 2 socet on 8 ...
<s>[INST]Not to sum last inserted Record. i want to not sum last inserted in table against I_ID column. I_ID=222 ,have three value 500 ,600 and 400. i have inserted last value 400 against I_ID ,which should not be sum and result will be 1100. Create TABLE #Tbl_IB_Cus_Libility (Li_ID int,I_ID in...
<s>[INST]Upgrade form a sql express vesion to another Good evening, I have an application that is hosted an application on a sql 2008 express. Now the db has reached 4 Gb an so is no longer usable. I would like to know if it's possible to update in place the version to at least 2008R2 express edition to inc...
<s>[INST]RESTORE DATABASE Performance We are trying to restore a DB from a backup taken on ServerA to ServerB. The .bak file is 55.3GB. We are using the following TSQL: ALTER DATABASE [DB] SET SINGLE_USER WITH ROLLBACK IMMEDIATE RESTORE DATABASE [DB] FROM DISK = N'\\share\Backup\DB_backup_2...
<s>[INST]Delete permission denied for Db_owner Hello, I have a database user who is db_owner. However, any time he tries to delete rows from a table, he gets the Delete Permission denied. He is able to create new tables, drop them. But unable to delete from them. Please advise , how to resolve this. ...
<s>[INST]Help with a Union Select statement I am wanting to Union the two Select statements below but I want the second statement to only bring back Addresses that are not in the result of the first select statement. I tried a AddressCode \<\> Addresscode in the second where clause but it's throwing an error. What am...
<s>[INST]will the windows update fail Our company has set up windows automtically download for some servers. One is: Security Update for SQL Server 2019 RTM CU (KB4583459) But my SQL server is already 2019 CU8, if I click to install all downloaded patches, this will run. Will it recognize my server has alread...
<s>[INST]SSMS - Shared Components Hi, I was wondering if shared components of Sql Server Management Studio get updated along with any SSMS updates if available? EG if you update SSMS, Visual Studio Tools for Applications will get updated if there is an update for it.[/INST]When updating/installing a new version of SSMS...
<s>[INST]Unable to Telnet SQL PORT -SQL Server 2019 Developer edition with CU9 Hi Team, I am using a SQL Cluster with single now. Microsoft SQL Server 2019 (RTM-CU10) (KB5001090) - 15.0.4123.1 (X64) Mar 22 2021 18:10:24 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows...
<s>[INST]making a stored procedure interactive is there a way for a stored procedure to move on to the next statement or maybe loop iteration only after person running it hits a return button or maybe types GO and then return? I think i've seen something like this before but that solution might only have allowed one i...
<s>[INST]can results be in order of IN keyword condtions? i'm using item numbers for the IN conditions to return a total of each item number ordered for sales orders between 2 dates. i need the results to be in the same order the item numbers appear in the IN statement. the item numbers in the IN statement are not sor...
<s>[INST]SQL Server 2017 CU 23 update query Hi, Few weeks back we had applied SQL Server 2017 RTM CU(KB4583457) GDR on our Prod system which is running on SQL Server 2017 CU22. Now with SQL Server 2017 CU 23 release, can we directly apply this patch on top of GDR update? or should we rollback SQL Server 2017 R...
<s>[INST]any effect of changing sa password hi every one.I have to change the sa password In sql server. Does changing the password have an effect on sql server jobs or any other object on the server? Is the sql server version important for the effect of this change?[/INST]Not on jobs or any other internal process. B...
<s>[INST]Database alert if no data added Hi friends, I’d like to have your help. I have a SQL Server database, and a table dbo.OnData on it. **I would like to receive an email alert from my database if:** - **within a range of 30mins from 8:00:00 a.m. opening time and default time per day** - **AND 30mins af...
<s>[INST]alternate to SQL Server Compact Edition Hello, Is there an alternate to SQL Server Compact Edition which won't be supported by MS beyond **July 2021**. It is needed for our Windows Desktop product built in C#.Net. [/INST]SQL Server Express is a free edition of SQL Server, ideal for development and production...
<s>[INST]Script to backup database on the last day of the week and last day of the month Hi All, Could you please help provide script which backups up the databases like below. 1. Daily full backup should happen to **Daily backup** folder. 2. Last day of the week backup should happen **Last day of Week**...
<s>[INST]Counting the number of Diagnosis codes by context ,Specialty and provider Hi Team, Hope you are doing well!.. I am trying to I am trying to count the number of diagnosis codes by context ,Specialty and provider..Can you please help me here.. Please find below the input and the output tables . **Input ta...
<s>[INST]An expression of non-boolean type specified in a context where a condition is expected Hi, I have an issue with this stored procedure (code below), it returns me the following error: **An expression of non-boolean type specified in a context where a condition is expected, near 'seque'.** Can you please help...
<s>[INST]How to attach an SQL Server database containing File Stream from one server to another server? I have a database, there is no backup. This database was created on SQL Server version 14 and that server is no longer available. I have the MDF, LDF and the filestream.hdr files. Now I want to attached t...
<s>[INST]How to find out if a database is being used? Hi, We have a database on a server, but we are unsure if anything is actually using it. Is there a way to monitor and store connections to the database? I was thinking of running it for about three weeks and if nothing connects, then taking it offline. Thank...
<s>[INST]Copying SQL Table with Service Provider I am attempting to move some SQL tables from an archive DB to a new DB in use by corporate dashboards. The archive is a linked server with OraOLEDB.Oracle as a provider. When I attempt to copy my table I get the following error: The OLE DB provider "O...
<s>[INST]alter recovery model to simple and effect on cdc enabled databases we need to alter the recover model to simple due to some reasons with space issues. some of the databases have cdc enabled on them, will altering from full to simple have any impact. after changing the recovery model to simple, do i n...
<s>[INST]Revert varbinary(max) data back after convert to varchar(max) I have a sql server column with varbinary(max). I converted it to varchar(max) for ssis package to move it to another table which is also varbinary(max). The value that was inserted is not correct and I want to revert back to the original value. So ...
<s>[INST]SQL Column AutoFill I have a sql table called tktproc with the following column proc_date with data type of datetime. How can i autofill column acct_period from proc_date in the following format YYYYMM?[/INST]In case of ancient servers, check the next statement: \_alter table tktproc add acct_period as (cast...
<s>[INST]Best way to export data with LOB columns. Greetings. I need to export several tables with LOB columns into new tables for long winded reasons. My current example has two XML columns on it, is 10 million records, and took about 12 hours to load through a job that calls SSIS. A few fun facts: 1. Nob...
<s>[INST]Table's design Hi everybody, I'm trying to figure out why one of the tables I took a quick look today is designed this way and does it make any sense or not. The table currently has ~42 mln rows. It has bigint identity column defined as primary key (non clustered) and it also has varchar(38) column w...
<s>[INST]AlwaysOn with backword campatibilty I have an environment with databases of different compatibility 100 - 140 running on a SQL 2017 server. 1. Will the databases with 100 compatibility support alwayson. 2. Is it advisable to include databases with different compatibility in an availability group. ...
<s>[INST]Delete using JOIN vs using subquery performance there are two query for delete delete from tableA a join tableb b on a.col1=b.col1 vs delete from tableA a where col1 in (select col1 from tableb) which one is performed faster. ?[/INST]answer: it depends. Somewhat longer answer: for ...
<s>[INST]Writing stored procedure Hi All, I want to write a stored procedure or sql query for the following functionality: - Select the branch name from a existing table (table name is reports) - loop through each branch name and get the latest date - Check if the test date exists for that branch, if n...
<s>[INST]table data script file with date range Hi, I need specific table data script file '.sql' file only specific date range (like insert into) when i get it through database -> task -> generate script it give all table entries. but i need only specific date range. note: i dont have admin rights Tha...
<s>[INST]syntax error Unclosed quotation mark after the character string I work on sql server 2012 i face syntax error when run query below SELECT PartID,Code,Co.CodeTypeID,Co.RevisionID,Co.ZPLID,Count(1) as ConCount FROM [ExtractReports].dbo.PartAttributes PM ...
<s>[INST]backup file size Experts , Can you please share a script which can extract the database backup(Full and Log) size for all the backups showing in the backup history table date and timewise[/INST]You can the backup file information from system database "msdb" table backupfile, for example SELECT * ...
<s>[INST]Copying files negative impacts on active SQL Server? Hello, I have one folder that holds all of our SQL Server .bak backup files and aiming to set up a daily job to copy this folder and all files to another different server disk location. This folder is pretty large and say it takes 1 hour to finish copyi...
<s>[INST]Operand data type varchar is invalid for sum operator. i am facing error on below line ,want comma in value ( 48,950.00) Operand data type varchar is invalid for sum operator. sum ( CONVERT(Varchar(50), Cast(tn.Debit as money),1)) [/INST]SUM can be used with numeric columns only. Null value...
<s>[INST]Issue to query Hi, What is reason of error like > Msg 8151, Level 16, State 0, Line 49 > Both a PRIMARY KEY and UNIQUE constraint have been defined for column 'compaddr', table 'dbo.user_main'. Only one is allowed. on this query? > CREATE TABLE [dbo].[user_main] ON [PRIMARY] > SET A...
<s>[INST]XML into primary and seconday table Hi, I have a xml data like below \<Activity> \<ID>2\</ID> \<Start>01/01/2012 13:00\</Start> \<Quantity>1\</Quantity> \<Observation> \<Code>14\</Code> \<Value>5\</Value> \</Observation> \<Observation> \<Code>76\</Code> \<Value>5\</Value> \</Observation...
<s>[INST]size of data in field Hello, I have some fields and the length is 1,333 of these fields. The application team want to reduce the size of these fields and want to know how much data is stored in these fields so to decide how much they can reduce the field size without loosing the data. How we can chec...
<s>[INST]Find what was causing blocking issues yesterday Hi, I have a job which occasionally runs slow. Is there a way in which I can find out what blocking occurred in the DB at a point in time? Thanks :)[/INST]There is nothing built into SQL Server to track that information. You can only see current b...
<s>[INST]Growth Rate Experts, Need help to capture the growth rate for multiple database for the last 6-12 months for future projections. Is there a query for it. [/INST]Need help to capture the growth rate for multiple database You surely backup all databases and so you can get the required informatio...
<s>[INST]SQL Group By & Order By Hi In my SQL Stored Procedure, i have a column named 'seq' to force the correct order sequence for the return list. Within the data are 7 categories of data and for each category, the sequence is 1 to nth. I have a Where clause to show only active rows and also to capture the incoming...
<s>[INST]when run this query get error invalid object x ? I run recursive but i face error it give me invalid object x so How to solve issue SELECT * INTO extractreports.dbo.getfinalpcMasks FROM (SELECT Po.FamilyId, Po2.GroupId, CON...
<s>[INST]what condition case when related to portion key mean ? I work on sql server 2012 I don't understand condition below do this condition as below case WHEN Po.PortionKey LIKE '%\[\_\]%' THEN SUBSTRING(Po.PortionKey, LEN(LTRIM(RTRIM(Po.PortionKey)))+1,LEN(LTRIM(RTRIM(Po.PortionKey)))) end as modifiedportionkey...
<s>[INST]SQL :Select unique/distinct rows based on the other column. Hi Team - I am trying to return the rows below the scenario SQL 2017: create table TableK ( oldID int, newid int, oldname varchar(20), newname varchar(20), oldstreet varchar(20), newstreet varchar(20), lastupdatedt datetime...
<s>[INST]two digits after decimal ? I want two digits after decimal. cast(B.Bweight as decimal(10,2))/cast(C.iWeight as decimal(10,2))*100 [Percentage] currently i am getting below result 0.9021512838300 but i want 0.90[/INST]The resulting data type when you perform an operation on two decimal v...
<s>[INST]Need to insert differences between Staging and Working tables into the Working Table Hi, Still kind of a newbie to SQL Server. Anyway I have two tables: tblStaging and tblWorking. The staging table is updated every 15 minutes and I need to look at what's different in the Staging table and insert the diffe...
<s>[INST]Nvarchar(Max) xml data into local drive Hi, I have a table with nvarchar(max) column where i have store the xml data. I want to export this nvarchar(max) xml data into my local drive. how to achieve that? Thanks [/INST]SSMS has so called **SQLCMD Mode**. It allows to output result of a query to ...
<s>[INST]Performance issue Experts , If I have a SQL Server 2019 having high physical reads , can it be said that it is a performance issue or do we need to look into some other parameters[/INST]As Erland mentioned, did any one complaint SQL server performance issue? If not, you do not have performance issue. ...
<s>[INST]FCI Alignment Experts, A Generalized question , if I have a 2 node cluster with FCI instances active on both nodes , one active instance on each node. 8 cores 156 GB on each node. 64 GB aligned to each instance on their respective nodes. From memory perspective I understand total I will be using...
<s>[INST]AlwaysOn Replication Experts , For a read-only / read intent database in secondary alwayson , can we have a sync replication and automatic failover between primary and secondary or will it be async only with a manual failover[/INST]\> but does it lead to a lot of locking due to sync replication for the read re...
<s>[INST]Update trigger is not updating row? I am inserting row in table(#tbl_leaves_Detail) using trigger,now i want to update it ,but update trigger is not working CREATE TABLE Tbl_Leaves ( L_ID int, L_From_Date date, L_To_Date date, L_Days int ); CREATE TABLE Tbl_L...
<s>[INST]Code line limitation in Stored Procedures Hi, I have a more generic Question about Stored Procedures. Is there a limitation of Code Lines in a SP, to create a optimized Execution Plan? Lets say in case that a SP has more than 1000 Code lines (excluding Comments and other non relevant lines) is it p...
<s>[INST]Memory Errors in SSMS log Hello , I have 1 database server which has 32 GB physical memory . 4 cpu. Instance is running SQL Server 2014 version, and OS is Windows Server 2016. Right now, 8 gb is allocated to SQL Server, and remaining is for OS. Before I have adjusted to16 gb is given to S...
<s>[INST]SQL Startup Experts , During the SQL Server startup the database recovery happens , is it simultaneous for all the databases on the Instance or is sequential i.e only when one database recovery completes does the next one starts Recovery completed for database xxx(database ID 25) in 2 second(s) (analysis ...
<s>[INST]SQL Server after version 2019 While it seems clear Microsoft has its head up the clouds so far that it may never see us little people back down here on planet Earth (you know, us on-prem guys that MS no longer cares about), I was wondering - and perhaps having hope against all hope---- Has there been any ...
<s>[INST]Connect to SQL database on server Hi all, I am new with android coding with Visual Studio 2019. Please help to show me or give me a sample code like input username/password and click "Sign in" button, the app will check user/pass in SQL login table to process. Thanks a lot.[/INST]I think you may need to as...
<s>[INST]Remove records from a table that are in another table Hi, I have a table (CTL_Sup) which has 25k records all with a Cust_ID I have another table (Cont_all) which has 450k records all with a Cust_ID Within the Cont_all table, we have the 25k records included that are in the CTL_Sup and what I wa...
<s>[INST]How to do change tracking for data insert/update & delete some time dotnet application change data in a specific table or some time user change data from SSMS. how could i detect which application made the change and from which IP data has been changed. please guide me full steps to achieve this. thanks[/...
<s>[INST]Identify cause of "Operand type clash: text is incompatible with bit” I have 2 SQLExpress tables Properties & PropertiesHistory, stored locally on my machine. They are meant to have the same structure because Properties History is an archive of changes to Properties records taken whenever a change to a Proper...
<s>[INST]Starting up databases after SQL Service restart Hello, I have a SQL instance which contains 74 databases. So I had to restart the SQL Service about 1 hour and 15 minutes ago. Ever since then the SQL log is flooded with these messages. Starting up database 'DB1' Starting up database 'DB1' ...
<s>[INST]TempDB and Memory Fellow DBA's, I am not necessarily having a serious ongoing issue but am trying to understand what I saw. I was reviewing who was using memory across all dbs. SQL 2016 had max mem set to 32 gb. Of that, tempdb was taking about 60-70%. There were no queries running. version store is not ru...
<s>[INST]Correct way to disable login for SA account?? We need SA to be database owner but reduce potential security issues. I've been told one thing to do is to *disable the login permission for the SA account*. However, in looking this up I'm confused...everything is t-sql code and it's not clear whether to use d...
<s>[INST]Can you install MS SQL SVR Express 2019 on Windows SVR 2016 that already has SQL SVR 2012 Native Client and SQL SVR Compact 3.5 SP2 installed Hi, I am trying to see if it is OK to install MS SQL SVR Express 2019 on a Windows 2016 Standard server that already has SQL Server 2012 Native Client and SQL Server Com...
<s>[INST]SQL Agent Job Step Hangs and not fail Good day, I have a ssis package within an SQL Agent Job, 2 things that fails on this pkg 1. Oracle connection, continously tries to reconnect and not fail 2. second part imports the oracle data within sql tables Part1 would not find a connection and will...
<s>[INST]Transactional log full in production db The Transactional log is full in production environment. I want to create a new transactional log in another disk say :M for temporary purpose as my current log file :L Drive is full. What do I do to clear the transactional log file in L Drive. How do i dele...
<s>[INST]Date Function Create a field in Table Colum:- tbl_inst_install_date Data Type -----varchar(50) Date **03/02/2016** No, I want to Convert this Colum Date from 03/02/2016 to **2016** (dd/mm/yyyy) To (YYYY) Kindly Advise us [/INST]Please refer below: select year(cast(yourcolu...
<s>[INST]Set session to be case sensitive Is it possible to set the collation for a query so that everything is case sensitive?[/INST]If your database and columns use a case-insensitive collation, you cannot specify/force case-sensitive comparison at the session/query level. However, you can do so with a COLLATE clause...
<s>[INST]AlwaysOn Load Though it would depend on the load , however on a very high level is there any study which mentions how much % the CPU, memory consumption would increase on setting up 2 replicas sync and async.[/INST]\> however on a very high level is there any study which mentions how much % the CPU, memory con...
<s>[INST]OUTER APPLY performance Hi, I have an OUTER APPLY in my query. When I run the query without including the OUTER APPLY columns in the main SELECT the performance is good. For example, in following query I am not including any of the columns from X. SELECT U.UserID, U.FirstName FROM U...
<s>[INST]How to remove SQL Server Standared Instance and keep Express Edition ? Hi, We get both SQL Server 2012 Standard Edition and SQL Server 2012 Express installed on the same Windows Server. There is a request to get the SQL Server 2012 Standard Edition to be removed. From Programs, we find that the...
<s>[INST]Executing SQL script from remote computer from command prompt We have Two Servers Server 1--\> Our APplication servers Server 2--\> MSSQL DB server this is a Training env setup so we restore it every week, There is a PowerShell script that does this restoration, The script stops/start services on "Server" ...
<s>[INST]python to extract/manipulate text data DIRECTLY with MS SQL Currently I use basic SQL's string functions (PATINDEX and SUSTR) to extract text data. From what I understand, MS SQL does not have full implementation of regex which makes it very difficult to extract data from string. Some people suggeste...
<s>[INST]SQL Server 2019 Database scoped configuration are there any good link / demo/ example for the following SQL Server 2019 Database IDENTITY_CACHE ISOLATE_SECURITY_POLICY_CARDINALITY ACCELERATED_PLAN_FORCING GLOBAL_TEMPORARY_TABLE_AUTO_DROP VERBOSE_TRUNCATION_WARNINGS thanks[/INST]For GLOBAL...
<s>[INST]Why am I getting error 'Conversion failed when converting date and/or time from character string'? Seems like other people have already asked this question, but none of the answered helped with my situation. I have a couple of 'stored valued functions' that take a date as an argument. create function loss.Cl...
<s>[INST]Can I concatenate two database table fields having integer datatype?? > Blockquote Hello, I am creating a table and I would want two particular fields to concatenate to form a 3rd field. Take for instance: ------------------------------------------------------------------------ class int not null, student...
<s>[INST]Will SSMS v18.4 supports SQL Server 2008, 2012? Hi, I would like to know the supported SQL Server versions with ssms 18.x Thanks [/INST]\>Will SSMS v18.4 supports SQL Server 2008, 2012? Yes, it is supported. Full agree with VaibhavChaudhari, SSMS 18.x works with all supported versions from SQL Server 2...
<s>[INST]JSON query This should be super simple, but I cannot get this to work. I want to extract routes data along with the trail id. Here is what I have SET @jsonVariable = N'\[ { "id": 1, "image": "trails/1.jpg", "name": "Countryside Ramble", "route": [ { ...
<s>[INST]SQL Server covering index I'm currently trying to optimize a number of indexes of an SQL Server OLTP database. I would like to shrink the number of indexes by either deleting them because they are of no use or combining those which have overlapping keys and or includes. One thing I'm not fully sure of is ...
<s>[INST]Count - Over Partition and Case Hi, I have a variable 'DU_Type' with the outputs being a '1' and '0'. ('1' being Yes, '0' being No) I want to do a count, something like this, but can't quite get it to work and wondered if anyone can help please? count(case when b.DU_Type = '1' then '1' else '0...
<s>[INST]SQL Server 2019 Datacenter Editon ? Hi, Vendor says that our SQL Server is running Datacenter Edition that is not supported. However, I find that there are only Standard Edition and Enterprise Edition available for SQL Server 2019. Is it correct ? I also find out the version we are running Microsoft SQL Se...
<s>[INST]Tables in a particular SQL Server Filegroup ? Hi, We find that there the database used by our Network Monitoring Software makes use of a couple of File Groups. Is there any way to find out which tables are located in a particular File Group ? Thanks[/INST]The following query will return the resu...
<s>[INST]SQL Server 2017 CLR strict security May I know if I have such CLR in an old database , say for example SQL Server 2014 , I would like to do backup restore to SQL Server 2017 or SQL Server 2019 , the restore process will failed ? Or still pass , however whenever calling the CLR in new SQL Server will fail...
<s>[INST]How to select the optimal setting for SQL Server Network Packet Size Hi All, I recently ran into some connection problems with a SQL Server 2017 instance and the problem turned out to be Network Packet Size. The Packet Size setting was initially set to 16384. By dropping it down to 8192, the probl...
<s>[INST]Failing Over on one of the SQL Server AG at one Location breaks the Distributed AG I have configured a SQL Server Distributed Availability Group (AG), containing a Windows cluster with an AG at one location, and a second cluster with its own AG at another location (thus, two AGs). Everything is working fine. H...
<s>[INST]Notification email when query results greater than 0 I'm looking for a way to get a email notification when query results are greater than 0 in a particular table. Is there a way to do this in SQL with a SQL Job or some other route? Your help is much appreciated!! Mike Hartman[/INST]Sure! Create an Agent ...
<s>[INST]SQL Agent scheduled backup job run overlaps next scheduled backup job run? Hello, I have a nightly 8pm scheduled SQL 2014 Agent job MaintenancePlan backup job that does Full backups all of our DBs. One of our DBs is very large and is still running backup currently (confirms it is progressing but very slow...
<s>[INST]OLE DB provider "Microsoft.ACE.OLEDB.12.0" "Unspecified error". We are facing the following error while reading the excel file on our SQL instances using following query: Declare @filePath varchar(max)='E:\New folder\ZCWTest.xlsx' declare @qry varchar(max) set @qry = 'Sele...
<s>[INST]The multi-part identifier could not be bound error. Hi everyone - Could you please help with this query. I know the error but is there any alternativefor this? Select * FROM #TempAutoclosure TmpAc INNER JOIN ( SELECT pa.applicationid ,pa.PaymentRequestID ,pa.CreateDateTime RequestedDate ,pa.FEInvoi...
<s>[INST]Differences between the available languages of JDBC Drivers The SQL Server JDBC Driver is available for download on the Microsoft website in different languages - for example: - sqljdbc_9.4.0.0_enu.zip - sqljdbc_9.4.0.0_deu.zip - sqljdbc_9.4.0.0_fra.zip - (...) Can anyone tell me exactly ho...
<s>[INST]How to use where clause to get more than one value in sql server? Hi Team I am getting a one specific value when im using where clause. Is there a better to get other values when IN statement inside parameters is used? Please have a look at my query below > select > [Station Description] ...
<s>[INST]How to use Add function in sql server? Hi Team I need some help, i don't have a record the filter the total of Station Description. What i want to achieve, if there is a way in sql server query. Where i can use Add function that will give me. Number of total Station Description per Date Time Passed colum...
<s>[INST]How to check for number of parentheses in a String - SQL I have an input string in the following format: DECLARE @input VARCHAR(2000) SET @input = '11.98, 123.007(p), 11.999, 12.998(p)(q),11.98(p)(q)(r)' While looping through each item in the list, I need to check the string for the number of paren...
<s>[INST]Problem reading xml nodes to a table Hi, I'm having issue reading all the ModelID's with respect to the Model. How do I get all ModelID's into the table w.r.t the CompanyCode DECLARE @XmlData XML SET @XmlData = '<Product> <Model CompanyCode="3020"> <ModelID>843743</ModelID> ...
<s>[INST]Transactional replication, extra argument Procedure or function sp_MSupd_dboTableA has too many arguments specified. (Source: MSSQLServer, Error number: 8144) Using EXEC distribution.dbo.sp_browsereplcmds, I was able to pull the commands. --cmd 2 {CALL [sp_MSupd_dboTableA] (,,,,,,,,2021-08-30 22:13:03...