I have been asked to look into this query and I need some help. But first I will give some background.
This company installs cable televison into customer homes for most of the large cable ...
I'm optimizing a query on SQL 2000. The query joins a single table to itself 5 times to get various MAX(values).
When I add a large covering clustered (or non-clustered index) to the tab...
This string works for what I need, but how can I shorten it for multiple column updates in the same row ?
UpdateString = "UPDATE [BCOMerchantTable] set [MerchName]= '" + NewMerchName + "' W...
Hi to all,
I have a table and i will be making a copy of every row in the table based on a WHERE clause. The new row that is being inserted is an exact duplicate of the original except for...
Hi everyone ,
im trying to do a select from a database , that database consists of User id's , time in (work ) and time out (work) .
thing is i have a few diffrent fields which i need to ...
We are currently designing a database for a new management system. In this database we need to keep information on people, and businesses. Both of these have addresses, as well as a few other ...
Hi,
i try to prepare an export of an SQL query into a text file which fields should be of a delimited lenght. The file should be like (the export has 2 fields and if field1 is 10 char and f...
I am working with SQL Server 2000 DB and using SSMS studio for my design tool. Necessarily I have an Outer Join based Query that returns NULL values just as you expect it should. What I would ...
In Excel VBA I am using ADO to connect to a SQL2K db, and set a recordset object = SP with one parameter
The SP works fine in QA
cmdPLCY.CommandType = adCmdStoredProc
cmdPLCY.CommandTex...
Hi,
I am working with 3rd party software that stores time in a SQL database field as datatype INT. For example: 142330 corresponds to 14:23:30 or 2:23:30 PM and 23421 (no leading zero) co...
I need to create a table that has one column that is an numeric ID. I need to have a trigger increment the ID everytime the table is read.
I know how to use external apps to update this ID...
Hi, experts
I need some help with a query to do this:
2007-11-12 00:00:00.000 1.0004206183589002 1.0029480464338278
2007-11-09 00:00:00.000 1.0004206183589002 1.0025263654392427
2007-1...
Hi Experts
Can someone advise on the correct SQL Syntax to return the rows of data where two variables do not exist in the same row.
For example: if i had a table with three rows of dat...
in ms sql i'm trying this:
set datefirst 1
select top 100 percent datepart(ww,[ENTRYDATE]) as weeknum,
max([ENTRYDATE]) as [Week Commencing],
sum(ISNULL(cast((PRODUCTDO...
In the code below, I have a dynamic SQL statement that works (thanks to imitchie). The result set returns a select statement using
AS ''Promo' + Cast(PromoID as Varchar)
I need to chan...
i am trying the following trigger statements and having problems. very new to this. can you help?
____
purpose. to send data inserted/updated in my table (which is called [Samples Received] ...
Hi,
I'm a newbee to SQL server. I need some help transferring a database from one machine to another.
I'm developing an applicatino in MS Access 2003, and linking it to a local instance ...
In SQL Server Enterprise Manager > Database > (Database Name) > users
I have a user that has a blank LOGIN NAME. I need to associate this with one of our domain accounts.
At one point ...
I am getting a very strange error message everytime I create a semi-complex SQL View. The error is:
ODBC error: [Microsoft....]The operation could not be performed because the OLE DB provi...
Why when i run this statement do i get the error: Cannot retrieve row from page (1:65580) by RID because the slotid (2) is not valid
DELETE FROM Reminders WHERE ReminderID = (SELECT TOP 1 ...
We currently have DTS jobs running to update information from our production database (SQL 2000) to a second server (for reporting SQL 2000). this is an overnight run. We want to improve ...
Hi there
Ran some serve side tracing and collected trace files (17), each of 1GB in size. I'm attempting to load these into a table in a database and have an issue whereby the Transaction ...
I wanted to change the value of one field without opening a table. The table is very large so going to the individual field by opening the table will take me a long time. Is there another wa...
Our ERP system (JDE) has three enviroments each in it's own SQL Database. The easiest way to refresh the production data to the prototype enviroment is to backup the production database (PS_Pr...
Hi,
I would like to have a copy of database A, and then restore it to another database B on the same server. I tried to do backup and restore but it gives me error message saying that this ...