Viewing 15 posts - 886 through 900 (of 1,229 total)
krypto69 (4/26/2011)
This statement -
select distinct glaccount, 'ACCOUNT NOT FOUND' ErrorReason
from dynamicsgp_utilities.dbo.V_sfvouchers
where (sfid like 'EM-%' or sfid like 'EXP-REP%') and sfid not in
(
select pordnmbr...
April 26, 2011 at 2:14 pm
Put a PRINT before the INSERT statement, like this:
PRINT @l_sql_string
insert into TSTDB.dbo.CAPACITY...
The last query printed will be the one which fails. Copy and paste it into a new query window...
April 26, 2011 at 1:05 pm
DROP TABLE #Test
CREATE TABLE #Test (Col1 VARCHAR(250))
INSERT INTO #Test (Col1) VALUES ('abc123 , xyz789')
INSERT INTO #Test (Col1) VALUES ('a1 , z9')
INSERT INTO #Test (Col1) VALUES ('b123456 , x99')
SELECT Col1,
Col2...
April 26, 2011 at 12:55 pm
GaMusicMan (4/26/2011)
Print (5596 / 11784)
This should return the decimal .47 . Instead...
April 26, 2011 at 12:23 pm
PSB (4/26/2011)
...
SELECT DISTINCT txn.Terminal,txn.ActivityDate,datepart (hh,ActivityTime) As H
FROM dbo.ABCD txn
WHERE ActivityDate...
April 26, 2011 at 11:46 am
SQLRNNR (4/26/2011)
Steve Jones - SSC Editor (4/26/2011)
RainWe have SNOW
Throughout the four-day Easter break here in the UK (that's the country with Cambridge in it, oh, and London too), the weather...
April 26, 2011 at 11:30 am
What are the rules associating different names?
April 26, 2011 at 11:24 am
Select A, B, C, D, E = CAST(NULL AS CorrectDataType)
from tabl1
Union
Select A, B, C, D = CAST(NULL AS CorrectDataType), E
from tbl2
April 26, 2011 at 11:14 am
Syed Jahanzaib Bin hassan (4/22/2011)
Check this script if you have any problem or modification required then tell me
Regards,
Syed Jahanzaib Bin Hassan
MCTS | MCITP | OCA | OCP | OCE |...
April 26, 2011 at 10:24 am
SELECT c.CompanyId, i.IndustryId
FROM dbo.[source] s
INNER JOIN dbo.Industry i ON s.Industry = i.IndustryName
INNER JOIN dbo.Company c ON s.company = c.CompanyName
WHERE c.CompanyId IS NOT NULL AND i.IndustryId IS NOT NULL...
April 26, 2011 at 9:05 am
Can you post the actual error message, and the actual statement which causes it? The following works just fine on SP1:
CREATE TABLE #TableD (FieldE VARCHAR(10) NOT NULL)
INSERT INTO #TableD VALUES...
April 26, 2011 at 3:54 am
-- What is the odd character and how many rows are affected?
SELECT ASCII(LEFT(REVERSE(MyColumn),1)) FROM MyTable WHERE ASCII(LEFT(REVERSE(MyColumn),1)) < 48
-- How does this work?
DECLARE @MyString VARCHAR(15)
SET @MyString = 'Something' + CHAR(13)
SELECT...
April 26, 2011 at 3:44 am
The values returned by each condition of a CASE construct must be of the same data type. Change
,CASE When APrio1 = 4 then RespT1
When APrio2 = 4 then RespT2
When...
April 26, 2011 at 2:22 am
Jeff Moden posted an elegant proof not so long ago that simple CASE is converted internally to searched CASE, I'll see if I can find it.
http://www.sqlservercentral.com/Forums/FindPost989878.aspx
Edit: added link
April 25, 2011 at 11:48 pm
Even with NOT EXISTS?
SELECT d.*
FROM Data d
WHERE NOT EXISTS (SELECT 1 FROM Intervals i WHERE d.dValue BETWEEN i.ivFrom AND i.ivTo)
April 25, 2011 at 11:45 pm
Viewing 15 posts - 886 through 900 (of 1,229 total)