473,890 Members | 1,301 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft SQL Server Forum

Microsoft SQL Server database RDBMS - Ask questions about MSSQL administration, queries, errors, xml, data access, transact-sql, tools, mirroring, integration, setup, stored procedures, merging and more.
0
20,214
iam_clint
thread by: iam_clint | last post Oct 24 '06 by: iam_clint
Posting GuideLines Please follow these guidelines when posting questions. Submitting clear and concise questions allow those reading to understand your problem and respond easily. Post your question in a relevant forum Give a clear title to your question Give as much detail as possible Clear explanation (in english if possible you will...
2
21,048
thread by: dynamicdrinks | last post 4 Weeks Ago by: sunniegoldie
I am working on a Sage 100 (MAS 90) Visual Integrator Job and trying to upload data from SQL. I created the ODBC connection, but I can't pick the database. Does anyone know how to select the SQL database once the ODBC connection is connected to the the SQL Server?
1
187
thread by: Tanveerbasha | last post Jun 3 '24 by: NeoPa
I have database with 263GB where free space is about 45GB. By using below query I executed the shrinking activity. USE GO DBCC SHRINKFILE (N'BriggsAX' , 250876) GO but I got the following error after 2 and half hours. Can you please suggest how I can resolve this issue. Msg 3140, Level 16, State 3, Line 1 Could not adjust the space...
5
19,724
TonFrere
thread by: TonFrere | last post Jul 10 '23 by: KRITGuy
Hello, I must convert a CSV file which is simply hexadecimal words. There is a SSIS function to convert from decimal to hex but none for either hex to decimal or hex to ASCII. Here is what my file looks like: 3032;3631;3031 3032;3631;3032 Here is what it should give: 026101 026102
2
23,982
thread by: saravana784 | last post Feb 10 '23 by: cetpainfotech
USE GO /****** Object: StoredProcedure . Script Date: 06/09/2007 20:15:29 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO
0
20,690
thread by: WIPE | last post Jan 19 '22 by: WIPE
In the last few days I have developed a small database within SQL Server, with the aim of improving my knowledge. For now, I need to create a view (for the analytics team), to which the following data should be reported in the view. ➤ Order ID ➤ Date and time of order creation ➤ Customer's first and last name ➤ Delivery date ➤ Item code...
0
4,007
thread by: Canes816 | last post Jul 20 '21 by: Canes816
I have the following example, which is reaching the max recursion. Declare @example table (RowID varchar(20), RelID varchar(20)) Insert Into @example Select 'Rec1', 'Rec5' Insert Into @example Select 'Rec1', 'Rec6' Insert Into @example Select 'Rec5', 'Rec1' Insert Into @example Select 'Rec5', 'Rec2' Insert Into @example Select 'Rec6',...
1
5,812
Rabbit
thread by: Rabbit | last post Jul 20 '21 by: Canes816
Introduction Starting with SQL Server 2005, you have the ability to create recursive queries using common table expressions (CTE). They are very powerful tools that can be used to query hierarchical data where you don't know beforehand how many times you have to join back to the same table. This is probably the most common use. But they can also...
2
5,633
thread by: programmerx101 | last post Jul 16 '21 by: Alice2k
Ok, I'm looking for expert advice on this one. I have a database which keeps going into read_only mode. Sometimes it goes into read_only / single user mode. Once it was taken offline completely. This seemingly happens randomly. Out of all of the database I have worked with, this has happened on 3 of them - several times randomly to each. All...
1
3,710
thread by: rhonda6373 | last post Jun 15 '21 by: Banfa
I am a beginner and trying to get the following results: All records from page0 where records on page4 do not have a Role of 'DCA Specialist'. Page0 is the one record table and Page4 is the table with the many records. The issue is: I getting records that have 'DCA Specialist' on page4. The Serial Number in Page0 joins to the...
2
4,189
thread by: Zeeshan Ahmad | last post Jun 8 '21 by: SioSio
i have the following table: CREATE TABLE dbo.Invoices ( varchar(20), varchar(20), date ) INSERT INTO dbo.Invoices VALUES ( 'INV-001', 'INV-001', N'2015-01-01 00:00:00.000' ), ( 'INV-002', 'INV-001', N'2015-01-01 00:00:00.000' ), ( 'INV-003', 'INV-001', N'2015-01-01 00:00:00.000' ), ( 'INV-004', 'INV-004', N'2015-01-01 00:00:00.000' ),
0
2,483
thread by: MC42015 | last post Mar 5 '21 by: MC42015
Hello - and thank you for reading my question! I have experience with IIf and Nested IIf, but I am completely stuck on this one. I have written in 15 versions of syntax and cannot get it to work. Here's what I need - I have an query that I need to analyze four fields of each record. One of these is fields always contains a value, the others...
1
3,740
thread by: SQLrookie01 | last post Feb 18 '21 by: NeoPa
Hi, I'm using SQL server and I'm trying to create a script to update my table if row exists, else insert into that table. Let's call the table I want to add rows into SALES and my other PROJECT Will always be a one-one relationship. If a new project comes in, I want to create a SQL statement that checks if that project exists, if it does...
1
7,598
thread by: rhonda6373 | last post Jan 19 '21 by: Banfa
Hello, I am a very new beginner. I have the following problem I would like to solve. I have a column named matterno in a table named page0. I have another column named court in a table named page2. I would like to find all matterno that have the court duplicated in page2. I would like to include both matterno and court in the results. ...
0
3,959
thread by: SQLUnitTester | last post Jul 23 '20 by: SQLUnitTester
I'm having trouble using some of the newer/odder INSERT/SELECT INTO syntax's They run just fine from a .SQL dialog from VS2015, but not within a SQL unit-test. In all cases I am populating a temp table and using MSSQL 2015. This standard syntax works just fine in both a SQL unit-test and as a SQL script in DevStudio; INSERT INTO #Expect...
0
2,762
SwissProgrammer
thread by: SwissProgrammer | last post Jul 22 '20 by: SwissProgrammer
I was reading an article here about database corruption . The author says to run CHECKDB command when some suspicious activity is noticed in the database. I do not see the logic in waiting for that activity and maybe going past it and using or creating corrupted data when it is not noticed. Therefore, how do I automatically run CHECKDB...
1
3,441
thread by: vedantbah | last post Jul 12 '20 by: Banfa
I have 4 columns a ,b ,c, d sample data a | b | c | d | 1 | 1 | 101 | 0 2 | 1 | 101 | 0 3 | 1 | 101 | 1 4 | 1 | 102 | 0
5
5,463
CroCrew
thread by: CroCrew | last post Jul 2 '20 by: Banfa
Hello Everyone, First I would like to thank you to anyone that give an answer to my question. I have a table like this one below (KeyID is auto-increment)... KeyID UserID Amount 1 12 1.00 2 09 1.00 3 12 5.00
1
4,237
thread by: DFUDGE | last post Jun 5 '20 by: SwissProgrammer
Installing SQL 2019 on a new server. I would like to use the old license which is 2008. How can I find the license> THanks!
0
3,014
thread by: s1shoaib | last post Apr 20 '20 by: s1shoaib
What would the query look like if I want to update data to another server, it has been linked already. Using a sub query once it runs I want that data to be moving over to the other server. Also this will involve multiple columns.
0
3,781
thread by: james10 | last post Apr 15 '20 by: james10
Hello, Following on from above is it possible to do similar as above exclude bank holidays but due to permissions on the server I am unable to create a table currently.
0
3,788
thread by: s1shoaib | last post Apr 8 '20 by: s1shoaib
Trying to update data from one server to the server. There are 3 columns: Year, Site and Code that need to be updated from my current server to Server2, however I keep on getting the error of "The multi-part identifier could not be bound." Below is my query: UPDATE ... SET ....= Poll., ....= Poll., ....= Poll.
1
3,107
thread by: s1shoaib | last post Apr 3 '20 by: lewish95
Created a query in server A to populate data for columns C,D,E. Now I want to move information for those columns C,D,E in another database in server B. I have already linked the servers.
0
2,596
thread by: s1shoaib | last post Mar 31 '20 by: s1shoaib
The data would be updated daily in the other server. I have stored my query in the temp table and it is pulling from there, this is the table name: #TEMP_TBALE_TEST. Below is my query UPDATE .. (This is the database, table name in another server, which I want the data to be updating in daily) SET ... = #TEMP_TBALE_TEST. FROM...
2
4,191
thread by: davidlowcy | last post Mar 16 '20 by: Rabbit
Hi, I have a table with below 6 columns, I need to sum the amount together if Name + Campany + age + Gender are the same, and the result needs to keep at TotalAmount Column. Name Company Age Gender Amount TotalAmount Nick A 40 M 800 Nick A 40 M 1200 Nick B 40 M 400 Nick B ...
1
3,466
dbrewerton
thread by: dbrewerton | last post Feb 5 '20 by: Rabbit
Greetings experts. I'm trying to figure something out and I'm having no luck. This query works fine as a direct query but my requirement is to make it into a procedure. The error from the proc is "Invalid object name 'Query'". Here is the query. SELECT TOP 5 Name, Sev, COUNT(SimID) AS Count FROM ( SELECT C.Name, B.SimID, (CASE WHEN...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.