Viewing 15 posts - 76 through 90 (of 345 total)
Skinning cat method #2:
select * from #orders o
cross apply (
select OrderNumber, SUM(total) OrderTotal
from #orders
where OrderNumber = o.OrderNumber
group by OrderNumber) a
December 20, 2011 at 3:37 pm
Did it help the last time we worked on this proc?
http://www.sqlservercentral.com/Forums/Topic1218042-392-1.aspx
December 19, 2011 at 10:17 am
salum (12/19/2011)
it will allow to do the addition if the data type is numeric. if column data type is char it will just contaminate.
Only if the table contains biological wastes....
December 19, 2011 at 9:46 am
GilaMonster (12/19/2011)
Is the CPU bottlenecked?
Is that functionality written optimally? Are there good...
December 19, 2011 at 9:10 am
lookatjks (12/15/2011)
...but is it possible to get the table name dynamically on which the trigger is defined in order to avoid hard coding the table name...
SELECT OBJECT_NAME(parent_object_id)
FROM sys.objects
WHERE...
December 15, 2011 at 8:15 am
omalie24 (12/14/2011)
December 14, 2011 at 8:06 am
Ok, here is a way to do this with using a loop. I'm showing this way because I think you will understand this the most. You should in general avoid...
December 13, 2011 at 4:20 pm
omalie24 (12/13/2011)
the data type in the first table is like that as a result of me importing the data from a excel sheet
Ok, but understand that if you want to...
December 13, 2011 at 2:47 pm
omalie24, this is the type of info we need to help you. I typed this up to get you started.
create table [dbo].[Test_Sales] (
[TRAN_DATE] varchar(10),[ITEM_CODE] varchar(20), [SERIAL_NUMBER] bigint,
[CUSTOMER_NUMBER] varchar(20), [CUSTOMER_NAME] varchar(20),[QUANTITY]...
December 13, 2011 at 1:11 pm
Sean Lange (12/13/2011)
toddasd (12/13/2011)
omalie24 (12/13/2011)
...every field stays the same except for the on being incremented....see code that i have below...it inserts first letter of each column and loop doesnt break..
That's...
December 13, 2011 at 1:07 pm
omalie24 (12/13/2011)
...every field stays the same except for the on being incremented....see code that i have below...it inserts first letter of each column and loop doesnt break..
That's because all the...
December 13, 2011 at 12:54 pm
In Access VBA, he is the basic way to call a proc:
Dim rs As New ADODB.Recordset
rs.Open "dbo.StoredProcedure1 " & [Forms]![AcftSelect]![cboSA], CodeProject.Connection, adOpenForwardOnly
'do stuff
rs.Close
Just concatenate the proc name and the parameters.
Edit:...
December 12, 2011 at 9:31 am
Nevermind that one, think I got it. Check that any of the dates in the table are before 1753:
SELECT *
FROM dbo.Names
WHERE DateOfLicense1 < '01-Jan-1753'
OR DateOfLicense2 < '01-Jan-1753'
OR DateOfLicense3...
December 8, 2011 at 2:38 pm
Also, if your columns are char based, then you may have an invalid date. Run this to find it:
SELECT *
FROM dbo.Names
WHERE ISDATE(ISNULL(DateOfLicense1,CAST('01-DEC-2015' AS DATETIME)))=0
OR ISDATE(ISNULL(DateOfLicense2,CAST('01-DEC-2015' AS DATETIME)))=0
OR ISDATE(ISNULL(DateOfLicense3,CAST('01-DEC-2015'...
December 8, 2011 at 2:28 pm
Viewing 15 posts - 76 through 90 (of 345 total)