Viewing 15 posts - 886 through 900 (of 2,007 total)
Cadavre (2/14/2012)
February 14, 2012 at 8:29 am
Jeff Moden (2/14/2012)
Cadavre (2/14/2012)
SELECT Code, Name, City
FROM (SELECT *, ROW_NUMBER() OVER(PARTITION BY City ORDER BY Code) AS rn
FROM #MyHead
...
February 14, 2012 at 8:07 am
kapfundestanley (2/14/2012)
Hello colleagues,I have more than 3 years working with SQL and would like your assistance in securing an international SQL DBA job.I would definitely appreciate your assistance.
Are you hoping...
February 14, 2012 at 6:01 am
Koen Verbeeck (2/14/2012)
Cadavre (2/14/2012)
Look at his "ID" column. You'll see that he essentially wanted to order that by the "Name", rather than using what was already stored in [Temp#1].
Well,...
February 14, 2012 at 5:37 am
That's slightly strange.
The below is using the same logic as your code, so can't see that it would work any better.
DECLARE @sql NVARCHAR(MAX)
IF (SELECT COUNT(*)
FROM sys.dm_exec_sessions
...
February 14, 2012 at 5:34 am
John Mitchell-245523 (2/14/2012)
SELECT * FROM #temp2ORDER BY ID
John
John Mitchell-245523 (2/14/2012)
February 14, 2012 at 5:11 am
BEGIN TRAN
--Your sample data
CREATE TABLE [Temp#1] (ID INT, Two INT, Name VARCHAR(6));
INSERT INTO [Temp#1]
SELECT 1, 1, 'XXABCD'
UNION ALL SELECT 2, 2, 'BCA'
UNION ALL SELECT 3, 4, 'ABCD'
UNION ALL SELECT 4,...
February 14, 2012 at 5:00 am
Am I missing something?
SELECT Code, Name, City
FROM (SELECT *, ROW_NUMBER() OVER(PARTITION BY City ORDER BY Code) AS rn
FROM #MyHead
...
February 14, 2012 at 3:00 am
Vincy-856784 (2/13/2012)
February 13, 2012 at 8:39 am
Jeff Moden (2/13/2012)
February 13, 2012 at 8:08 am
SELECT *
FROM Log
WHERE ActionTimeStamp >= '2012-10-02 07:30:00' AND ActionTimeStamp <= '2012-10-02 08:30:00'
February 13, 2012 at 8:03 am
memymasta (2/13/2012)
I got this query..
Select a.a from a LEFT JOIN b ON a.a=b.b WHERE b.b IS NULL
Is it possible to get same results with
Select a.a from a LEFT...
February 13, 2012 at 7:55 am
DECLARE @Fields AS VARCHAR(4000)
DECLARE @ClientName AS VARCHAR(100)
DECLARE @AuditYear AS VARCHAR(50)
SET @Fields = 'Audit Number,Audit Year,Client Name,status'
SET @ClientName = '''AAFES'''
SET @AuditYear = '''2010'''
DECLARE @SQLstmt NVARCHAR(MAX)
--Do the dynamic bit
SELECT @SQLstmt = COALESCE(@SQLstmt,...
February 10, 2012 at 9:05 am
Something like this should do: -
DECLARE @Fields AS VARCHAR(4000)
SET @Fields = 'Audit Number,Audit Year,Client Name,status'
DECLARE @SQLstmt NVARCHAR(MAX)
--Do the dynamic bit
SELECT @SQLstmt = COALESCE(@SQLstmt, '') + ',' + CHAR(13) + CHAR(10)...
February 10, 2012 at 7:13 am
vijay82 (2/10/2012)
The connection statement looks like this:
conn.open "Provider=SQLNCLI10; Data Source='xxxxxx';Initial Catalog='yyyyyyyy';User Id=sssss ...
February 10, 2012 at 4:48 am
Viewing 15 posts - 886 through 900 (of 2,007 total)