I have a table in a sql server 2000 database with 2 datetime columns (start_date, end_date). the database collation is latin1_General_BIN. I am running the following query that is doing a d...
I have 3 tables. I want to remove rows from table A that have a value in a DateEntered field before a specific date but have no history records after that date in table B or C. I have this ...
Hi Guys,
I would like to know if i get MSSQL to return the current time in a specific timezone.
I would like a function like this :
castFromServer ( getDate , "the_timezone_I_am_after...
HI Experts
Please look at the attached code, it is an auto-generated code by MS Enterprise Library, Can you explain what is the purpose of the check for @@rowcount value and why if it is 0 ...
Hi all,
I have the following stored procedure in SQL Server 2000:
CREATE PROCEDURE [dbo].[sp_CSV_COPROD] AS
BEGIN
DECLARE @bcpCommand VARCHAR(8000)
SET @bcpCommand = 'bcp partman.db...
I am importing data to an existing SQL Server table that has an int 4 field that must be unique, but cannot be changed to an auto-incrementing identity field. It will be a negative integer, t...
Experts:
I'm getting my feet wet with MS Reporting Services, using BIDS.
I have a very simple chart that lists count of customers by STATE.
Question: How do I tell the chart to ONLY ...
Hello -
We have a new table format for fiscal year 2009. I used to be able to pull the fiscal week no. from 1-52. Now, I will need a function in the queries to calculate the fiscal week no. H...
I need to be able to run xp_cmdshell from a sp in my database. This runs fine for me, as I'm a sysadmin user, but when the actual user, who is not, tries to run it, it fails.
So I created ...
How do i recover deleted datas from ldf file on Sql 2005? I dun have the latest bak file. If there any query statement that i can retrieve back the delete data from ldf? Ya, i know many sugg...
I changed our Domain Controller over the weekend and since I have done this, no one is able to refresh various sales reports we have which run via OLAP cubes out of SQL Analysis Server 2000.
...
What I am wanting to do is an address search on all property addresses I have in the database (~90k). I am wanting to bring back results that are exact and/or close to the search. So I have ...
SQL Server error 18452, Login failed for user (null). I read many articles abotut this issue but couldn't solve it anyway..
I'm using a Win 2003 Server with SQl 2000 SP4 installed. locally I ...
I need to convert a DB that is currently in SQL Server 2005 back to SQL Server 2000 for use on another system. How can I do this?
Before installing SQL 2005 I take file backups (.bak) of system databases such as master, msdb etc.
We do not have sql 2000 now and suppose that we dont want it either.
In order to get bac...
Can anyone give me a SQL script that takes the tables in two databases and compares the data column-by-column to see where the differences are? I have an application that I want to verify tha...
Is it possible to export my results to an excel spreadsheet with the header information. I have tried to results to a file but that save them as a .rpt file that does not open correctly in Ex...
I'm creating a hashtable with the syntax :
SELECT * INTO #CGTAdjustments FROM Adjustments
Is it possible to create an index on this temporary table?
My SQL Server is getting some deadlocks and I can't seem to figure out why. Can anyone give me some advice?
Hi Everyone,
I have this script which runs fine before and now when i run it it give me error
"divided by zero occurred"
i have pasting the whole script and then the only parts which...
I have been handed over a data pull in SQL 2005 from a member of staff who has left the company.
This involves a project in SSIS with 3 DTS packages, I hav3e updated these to point to a new...
I have attached my code, which produces the following results:
1
1
3
1
1
1
2
1
3
2
1
3
1
2
2
1
1
1
3
1
1
1
1
3
2
1
1
1
1
1
1
1
2
1
1
1
1
2
1
1
1
6
...
I have a feild called image url
I need to modify the records so as to take out a portion of the url stored there.
Here is how it is stored:
/moonsoup/uploads/3724-FreshStart-ChunkyPuzzl...
I was previously assisted with this code which (through a Javascript applet, collects fieldnames and data from a form and saves them into one field called "fieldnames" then splits it back out ...
I had an issue over the weekend with our accounting software (Axapta) losing all the data in its tables. The software relies on a SQL Database. I was able to restore the database and get most ...