Viewing 15 posts - 31 through 45 (of 110 total)
What is Hungarian notation?
September 6, 2007 at 7:42 pm
INSERT INTO TableB
SELECT 1, BreakQty1, Discount1 FROM TableA WHERE BreakQty1 IS NOT NULL -- or you condition
UNION SELECT BreakQty1 + 1 , BreakQty2, Discount2 FROM TableA WHERE BreakQty2 IS NOT...
September 5, 2007 at 7:36 pm
You need 5 SELECTs also.
If you want to insert 1 to 5 records, you need 5 INSERT statements.
or
You can use UNION.
September 5, 2007 at 7:19 pm
Do you see
SET ROWCOUNT = 5000
in your SP?
September 5, 2007 at 2:22 am
My Enterprise Manager does not show record count.
September 5, 2007 at 12:25 am
declare @WOW NVARCHAR(2000)
set @wow =
'Use XXXX
DECLARE @table_from_cursor nvarchar(150)
DECLARE @SQLString nvarchar(2000)
DECLARE @StringForExcecute nvarchar(2000)
DECLARE table_cursor CURSOR FOR
SELECT ...
September 3, 2007 at 9:27 pm
The below 2 lines are both strings.
This sentence has no single quotes.
'This sentence are in quotes'.
Try it anyway. You will find the next problem in your script.
September 3, 2007 at 3:16 am
maybe
SET @StringForExcecute = ''''+@SQLString+''''
should be
SET @StringForExcecute = @SQLString
September 3, 2007 at 2:20 am
Peso,
I have been reading many of you and a few others's excellent solutions.
I know join is much more efficient.
I have learned that from you and Jeff M and a few...
August 29, 2007 at 3:51 am
SELECT CONVERT(VARCHAR, v.Number) + ' to ' + CONVERT(VARCHAR, v.Number + 1) AS [Hit time],
(SELECT COUNT(*) FROM @LoginTrack Z WHERE DATEPART(hour, Z.LoginDateTime) = V.Number) AS Hits
FROM master..spt_values AS v
WHERE...
August 29, 2007 at 1:02 am
DECLARE @T TABLE (ID int, CustID int, PhoneID int)
INSERT INTO @T SELECT 1, 1, 10
UNION SELECT 2, 2, 10
UNION SELECT 3, 3, 11
UNION SELECT 4, 1, 12
UNION SELECT 5, 2,...
August 19, 2007 at 8:54 pm
Server: Msg 164, Level 15, State 1, Line 4
GROUP BY expressions must refer to column names that appear in the select list.
August 17, 2007 at 3:58 am
SELECT test.TestID, IFNULL(location.LocationName, '-') AS LocationName, IFNULL(product.ProductName, '-') AS ProductName
FROM Test as test
August 6, 2007 at 2:54 am
Viewing 15 posts - 31 through 45 (of 110 total)