Viewing 9 posts - 16 through 24 (of 24 total)
You could use COMPUTE(Amount) or take the
SUM(Amount) and group by the rest of the columns specified in the SELECT Statement, to achive you result.
August 30, 2003 at 3:25 am
Its better to use the INSERT statment between
BEGIN and COMMIT/ ROLLBACK, in which case I think you will not face this kind of issue. Or Another way is, to formulate...
August 30, 2003 at 3:08 am
Well Jnelson, Mr. 5409045121009 is using corelated Sub-query. Thats one way of doing it. The other way to do is,
Select (ColA/ColB) as Sum1, ColB into #TempTab from SomeTable
Go
Select (Sum1/ColB) as...
August 29, 2003 at 11:54 pm
Your objective is maintain a key value, which is a combination of the Customercode, Year and running serial number. The simple way to do it is,
Cast(@CustomerCode as varchar(n))+ cast(year(getdate())...
August 29, 2003 at 11:38 pm
fromnaija is quite right. There is no Global variables concept inbult in SQL Server. However, you can have a table in the master preferably or in the same database, where...
August 29, 2003 at 11:19 pm
Sorry, forgot to mention, while using the CONVERT of CAST in your UPDATE statement for that Column, you should CONVERT the Column to INT.
August 29, 2003 at 3:01 am
write an UPDATE statement, and us CONVERT or CAST and convert the datatype of that Column in the UPDATE statement, then the leading zeros will be removed.
August 29, 2003 at 2:57 am
use DBCC SHRINKFILE with TRUNCATEONLY option,
what it does is it shrinks the files to the extent possible or to the actual size of the data available and then frees the...
August 29, 2003 at 2:49 am
Yes, I do agree with the gentleman, who said it was not a problem if u could pass the query thru front end, the sql compiler would treat as a...
August 22, 2003 at 8:16 am
Viewing 9 posts - 16 through 24 (of 24 total)