Viewing 15 posts - 6,466 through 6,480 (of 7,164 total)
I think you want to use SUM with a CASE statement. Maybe something along these lines:
SELECT SUM(CASE WHEN B.TRANS_TYPE = '2' THEN 1
...
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 4:18 pm
I find it useful to loosely equate Excel Workbook files as databases and to think of a Workbook's Worksheets (aka Tabs) as tables. Just like with SQL Server you cannot...
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 4:06 pm
mitch.fh (5/11/2011)
I just want to know if anyone made bigger test with those types before I move...
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 2:46 pm
lindsaywang (5/8/2011)
I only want to create one query has 8000+ charaters, and prove the openquery doesn't work. and see a solution for it. Becasue I can't give you the...
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 2:16 pm
Please post the table definition including constraints and indexes as well.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 1:39 pm
JCSQL (5/9/2011)
and can someone tell me how to paste the code so it looks EXACTLY like I have it in T-SQL? IT always looks terrible right after I post it.
Surround...
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 12:43 pm
balasach82 (5/11/2011)
We have to use Image datatype; thats the requirement. So if is there a way to load bytecode into image field by any means?
IMAGE is a deprecated data type....
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 11:37 am
Ooops...wrong thread.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 11:35 am
I have not tested them side-by-side however DATE has an edge in terms of its size...the storage size of an INT is 4 bytes while the storage size of the...
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 11:03 am
Here's a working demo with the GROUP BY that shows the escape issue:
SET NOCOUNT ON ;
GO
IF OBJECT_ID(N'tempdb..#Data') > 0
DROP TABLE #Data ;
GO
CREATE TABLE #Data
(
id...
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 10:31 am
PHXHoward (5/11/2011)
opc.three (5/11/2011)
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 10:00 am
If you're using SQL2005 you should not be using the IMAGE data type...use VARBINARY instead.
You can convert a hex string to VARBINARY using the CONVERT function...make sure you pay attention...
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 9:55 am
Very cool. Thanks for the additional link and for your notes.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 7:35 am
It could be ANSI_WARNINGS or ARITHABORT.
ANSI_WARNINGS and ARITHABORT are both ON for new query windows in SSMS 2008 R2 by default which DOES allow Divide By Zero errors to bubble...
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 6:48 am
PS Be careful with using the XML RAW method as well...it escapes characters like ampersands and angle brackets to their XML-safe equivalents (namely & , < and >) so...
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
May 11, 2011 at 6:10 am
Viewing 15 posts - 6,466 through 6,480 (of 7,164 total)