Viewing 10 posts - 16 through 25 (of 25 total)
Very cool!!!
living and learning !!!!
http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/
CREATE PROCEDURE SearchHistory_Dynamic (@Product int = NULL, @OrderID int = NULL, @TransactionType char(1) = NULL, @Qty int...
November 16, 2012 at 10:09 am
LIVING AND LEARNING!!!!!!! 😀
November 8, 2012 at 9:26 am
Hi,
SELECT NUMBER='51079-216-20' into #number
UNION ALL
SELECT NUMBER='3456-435623-45-34'
SELECT NUMBER=REPLACE(SUBSTRING(NUMBER,1,DATALENGTH(NUMBER)-2),'-','')
...
November 8, 2012 at 9:22 am
Hi,
Value = '12 'or '123', exist?
DECLARE @ID CHAR(8)
SET @ID='12'
SELECT ID= REPLICATE('0',8-LEN(@ID))+@ID
...
November 7, 2012 at 11:49 am
SELECT ID=ID,
NAME=NAME,
SALARY=SALARY,
SALARY2=(case when SALARY-1000=0 then null else SALARY-1000...
November 7, 2012 at 3:26 am
sorry.... Portuguese...
Somente um parenteses Luis...
--Here i need an IF condition to test
SELECT tam FROM sgt WHERE tam = 'Y' AND ref = @ref...
October 10, 2012 at 6:35 am
Jason-299789 (10/5/2012)
The Update with an INNER JOIN and WHERE is by far the most effiecent way of updating in these cases, as you will only ever hit the rows that...
October 5, 2012 at 8:11 am
update tblAverageMonthlyConsumption
SET REGION=(SELECT TOP 1 BB.REGION FROM tblgas01g4c40 BB WHERE tblAverageMonthlyConsumption.ID_NO=BB.ID_NO)
October 5, 2012 at 5:13 am
In this case:
distinct and no where clause (full scan?!?!??!?! almost... Very slow!!)
options: NOT EXISTS ... sometimes use: (SELECT TOP...
September 13, 2012 at 11:57 am
SELECT table1.column1,
'99',
left(table1.column2, 2),
max(table1.column3),
'Yes',
'Test'
FROM table1
WHERE NOT EXISTS ( SELECT 1
FROM TABLE2...
September 11, 2012 at 2:18 pm
Viewing 10 posts - 16 through 25 (of 25 total)