Viewing 15 posts - 781 through 795 (of 1,124 total)
It would be hard for us to provide the best solution without knowing what you exactly want from us. Its there in your mind but not mine.
Looking at the...
December 6, 2007 at 5:13 am
Well, It would have been very easy if you were using SQL 2005, otherwise what you could do is...
1. Create a temporary table #VT with IDENTITY column
2. Insert data from...
December 6, 2007 at 3:54 am
Since I'm a developer, I don't keep much administrative stuffs with myself:hehe:
Anyways, here is a script to retrieve server information along with current active user information.
December 6, 2007 at 2:56 am
You can get the information about server in system tables such as sysservers, sysconfigures, sysdevices etc...
Or just use the search at the top the page for scripts...
December 6, 2007 at 2:10 am
Is this what you're looking?
SELECTDISTINCT Discount
FROM
WHERE( DiscountMatrix = 'CIDG' and CustomerGroup = 'BENCH' )
OR ( DiscountMatrix = 'BIDG' and DiscountGroup = 'BA' )
December 6, 2007 at 1:48 am
Use this...
DECLARE @Identity SMALLINT
SET @Identity =1
SELECT 'P' + LEFT('00000', 5 - LEN( CONVERT( VARCHAR(5), @Identity ) ) ) + CONVERT( VARCHAR(5), @Identity )
SET @Identity =9856
SELECT 'P' + LEFT('00000', 5 -...
December 6, 2007 at 1:44 am
You need to create a credential of a windows account having the required privileges and then you have to map this credential to the sql server login account.
December 6, 2007 at 12:28 am
Check this out...
SELECTTOP 10 T.*
FROM( SELECT CNO, MAX( SNO ) AS SNO FROM SomeTable GROUP BY CNO ) T
ORDER BY SNO DESC
December 6, 2007 at 12:26 am
Jai (12/6/2007)
Hi,The best choice can be to use a dynamic sql where you can make the where class optional...
Jai,
I appreciate your feedback but, dynamic SQL is not always the...
December 6, 2007 at 12:24 am
Is this what you're looking for?
SELECTTable1.column1, Table2.column1, Table2.column2, Table3.column1, Table4.column1
FROMTable1
LEFT JOIN Table2 ON Table1.Column9 = Table2.Column11
LEFT JOIN Table3 ON Table1.Column6 = Table3.Column5
LEFT JOIN Table4 ON Table1.Column6 = Table4.Column9
WHERETable1.Column1 = @InventoryID
AND...
December 6, 2007 at 12:18 am
Check for the performance hindering operations such as table scans, spools or bookmark/RID lookups.
December 5, 2007 at 11:41 pm
How about all having in a single query...
SELECTA.*, B.*
FROMTempTableA A
FULL OUTER JOIN TempTableB B ON A.col1 = B.col1 AND A.col2 = B.col2 AND A.col3 = B.col3 AND A.col4 =...
December 5, 2007 at 11:32 pm
Although, Matt's solution do provide the results you wanted, but it uses functions in WHERE clause which can be avoided. Using functions in WHERE clauses is not always scalable...
December 5, 2007 at 11:23 pm
Viewing 15 posts - 781 through 795 (of 1,124 total)