Viewing 15 posts - 9,766 through 9,780 (of 10,144 total)
tedo (7/28/2008)
July 29, 2008 at 2:30 am
tedo (7/28/2008)
July 29, 2008 at 2:23 am
Hi Pino-daddy
This is untested (no data).
I've made two main changes to the query
1. Replaced old-style joins
2. Renamed the outermost derived table from D2 to D3
select distinct D3.c4 as c1,
...
July 28, 2008 at 12:45 pm
Hi Brandon
It's a little sketchy, but there's at least one solution for this. The simplest to follow is along the lines of...
SELECT ReceivedCases = SUM(CASE WHEN status = 'C' AND...
July 28, 2008 at 9:41 am
DROP TABLE #Test
CREATE TABLE #Test (TestString VARCHAR(30))
INSERT INTO #Test (TestString)
SELECT 'V104 - Luis' UNION ALL
SELECT 'VHBG 104 - Luis' UNION ALL
SELECT 'V1 04 - Luis' UNION ALL
SELECT...
July 28, 2008 at 5:38 am
Venkatesan Prabu (7/26/2008)
select count(*) from table
will fetch you the count of rows in your table.
If you have date column then you can modify the query like,
select count(*) from table...
July 28, 2008 at 2:38 am
What do you get when you execute this?
DECLARE @CMD VARCHAR (1000)
SET @CMD = 'DIR C:\Inetpub\wwwroot\Pergamum\Doc\*.*'
IF OBJECT_ID('tempdb..#Output') IS NOT NULL
DROP TABLE #Output
CREATE TABLE #Output (CopyResult VARCHAR(500))
INSERT INTO #Output EXEC...
July 25, 2008 at 9:28 am
So, you're starting about here...
DECLARE @StartDate DATETIME, @EndDate DATETIME, @OrderID NVARCHAR (40), @CustomerID NVARCHAR (40), @ICPAuditID NVARCHAR (40)
SET @StartDate = somedatetime
SET @EndDate = somedatetime
SET @OrderID = something or NULL
SET @CustomerID...
July 25, 2008 at 9:22 am
b_boy, you haven't declared all of the variables. In any case, it's going to save you time to test this as a query in QA before comitting it to a...
July 25, 2008 at 8:56 am
Does this directory exist on the SQL Server which is running the command? 😉
If not, you will need to figure out the address and substitute it for what you're using,...
July 25, 2008 at 8:03 am
RyanRandall (7/25/2008)
Here's an alternative...
select cast(stuff(stuff('280908', 5, 0, '/'), 3, 0, '/') as datetime)
Is it friday or have we been here before?
July 25, 2008 at 7:53 am
Hi Terry
You don't need to hold your breath - try the code in SQL Server 2k.
Cheers
ChrisM
July 25, 2008 at 7:51 am
bellammj (7/25/2008)
July 25, 2008 at 7:32 am
Are you sure you're in the right forum? This is an Oracle error
http://ora-00904.ora-code.com/
indicating that a column in the SELECT list doesn't exist.
Having said that, it's good practice to check that...
July 25, 2008 at 7:18 am
You're welcome Jude. To consolidate what you've picked up from this snippet, I'd strongly recommend you read "Using Joins" in BOL.
Cheers
ChrisM
July 25, 2008 at 7:13 am
Viewing 15 posts - 9,766 through 9,780 (of 10,144 total)