"ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
Hello All, i am trying to connect to sql server database using ODBC connection string. i am fine when i access application with local sql server. but problem is when connecting to another standalone sql server. the error i am getting is…
Item order in Correct Format
here is my query and query result also i pest what result what i want SELECT StockGroup [Stock Group], [Item Description], [Balance Bag] [In Stock], [UOM 1], [Balance Stock] [In Stock], [UOM 2], [Usage Per Day], [No of Days In Stock], [Lead Time],…
EDI cross reference table
Any suggestions on building and maintaining a table in SQL server that will be used to cross refence for EDI?
SQL Server optional parameter performance issue
Hello guys, I have an optional parameter in a SP e.g. @MyParam int = NULL When I check the param against NULL upfront I end up with TWO queries e.g. IF (@MyParam IS NULL) BEGIN SELECT ... END ELSE BEGIN SELECT ... END Otherwise if I check…
Is support for SQL data queries in Excel being phased out?
I was told today by my IT department that I'll have to stop using Excel with SQL data queries to pull data directly into Excel from a SQL server. They stated that Microsoft was phasing out this feature. I couldn't find anything searching the Microsoft…
best approach to migrating a table from system to another
I have a test system where we update entries on a table for cross refence purpose and was wondering the best approach for this.
Best way to learn SSIS
I got a new role where we will use SSIS to migrate data from test system to production. What would be the best way to learn SSIS as I have worked with T-SQL and SSMS. It will be on premise 2019 edition.
The characters of a database's table's volumn_name is replaced by question marks, how to fix it ?
Hi everyone, my database have a table which volumn_names are Chinese characters. when I use " SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'table-name '; " the volumn_name display correctly, but if I use " select…
VB.NET SQL Connection and SQL Command Error BC3002
Hello, I'm in the process of converting VBA to VB.NET with SQL statements. One of the changes is utilizing the "ExecuteNonQuery". Since I'm still learning the syntax, I simply copied the VB.NET statements from a web-site. But I'm getting 2…
should i prefer join over exists or in
hi, I have seen people use exists when exists is required and no cols are required in select. But I notice sometimes exists slows down and join performs better q1) is there any news i should know , that one should not use exists or in , and should go…
Microsoft SQL Server Studio - Dark Mode
Is there any official method to use Microsoft SQL Server Management Studio Studio with Dark Mode?
Synapse Serverless CETAS fails with error "Fatal exception occurred: bad allocation".
Hello, I am trying to create an external table (CETAS) from a large amount of fairly small json files, so that they can be queried more efficiently. The json files are stored on ADLS. Previously this worked fine, when i let the query run for 1 - 1.5…
Connect to on-prem sql server using Azure Relay
Hi, I would like to connect to a on-prem sql server and execute T-SQL commands to listen and receive SQL broker messages from Azure cloud hosted .net application. How can i connect to on-prem sql server and execute these sql commands and receive the…
Delete query throws "semaphore timeout period has expired"
Hi All, I'm running a delete query as part of purge activity. The delete query has about 12+ foreign key constraints, and when we try to delete 1300 records as per our condition we get the below error. The table has about only 15K records and the db…
Complex Pivot using the existing data
--ALTER PROCEDURE Energy.GetGTSTDataForManualEntry --( -- @Date DateTime -- ) --AS BEGIN DECLARE @Date DateTime = '2024-03-29 00:00:00.000'; DECLARE @CalendarID INT = Time.GetCalendarIDByLocationCode('Energy'); DECLARE @DayPeriod…
Oracle Connector on Polybase
Hi everyone, I currently have Polybase (SQL Server 2019 RTM) that connects to Oracle database. This was working well untill the Oracle database was upgraded to 13c and I started getting this error: TNS: Listner could not resolve SERVICE_NAME…
Convert 14 Char String to Datetime
I have a field in a table called TraceID that stores data like this: 2024040611102200021 The first 8 characters represent the date (YYYYMMDD). The next 6 characters represent the time (HHMMSS). The last five are insignificant numbers. So this would be…
Transpose column to rows
Hi, Without using a cursor (if poss) I would like to turn the following data into rows based based upon the integer in column two. So I would end up with 5 rows for the first date, 1 for the second etc. Can anyone advise on how best to do this pls?…
Parsing First, Last, Middle Initial and suffix from full name
I am trying to extract first last middle initial and suffix from a name field and there's no set pattern please see the pattern of the in my table LOPEZ ROQUE, CARMELINA ORTEGA, GISELLE A A RUSSELL JR, WILLIE C NUNEZ, LILIANA I have looked online and…
SQl Server Agent "Unexpected Termination" with no error details
Hi, I have built an SSIS project where one main package refers to and carries out over 30 other packages in succession. Each package does the same job - uses an excel sheet as a source to then update the same data stored in a SQL Server database…