Viewing 15 posts - 2,881 through 2,895 (of 10,144 total)
You need something with which to associate the two tables. Column EDI_PARTNER_CD looks like the only column in MG_EDI_CONVERSION which might be related to COMPANY_ID or COMPANY_NAME.
Do you have...
October 6, 2014 at 4:34 am
Koen Verbeeck (10/6/2014)
ChrisM@Work (10/6/2014)
Looks to me like an error in the query:...
Good catch.
And that's why we use the SQL formatting people 😀
+1
Our little team's working with DB2. If you think...
October 6, 2014 at 4:06 am
Looks to me like an error in the query:
SELECT
A."CCUST" AS "CUSTOMER_NO",
A."CNME" AS "CUSTOMER_NM",
B."CTDESC" AS "CUSTOMER_GROUP_NM",
C."SNAME" AS "CUSTOMER_CAT15_DESC",
D."TMDESC" AS "TERMS DESCRIPTION",
E.CCCODE AS ZCC_CODE
FROM
ERPLXF."RCM" A
JOIN ERPLXF."RCT" B on B."CTCOMP"=A."CCOMP" AND...
October 6, 2014 at 3:58 am
ZZartin (9/30/2014)
The basic idea would be something like,
CREATE TABLE #test_table (COL_ONE varchar(30), COL_TWO varchar(30), COL_THREE int)
...
-- Cursor version
DECLARE @sql varchar(max),
@col_three int
DECLARE temp_con CURSOR FOR SELECT DISTINCT COL_THREE FROM #test_table ORDER...
October 3, 2014 at 9:12 am
;WITH SampleData AS (
SELECT * FROM (VALUES (1 ,0.11, 0),(2 ,0.45, 0.5),(3 ,0.85, 0.75)) d (id, A, B)
)
SELECT *, F = r3.A * ( 1 - r3.B * (...
October 2, 2014 at 9:51 am
Igor Micev (10/1/2014)
CREATE FUNCTION dbo.fnGetMonthDays(@myDate DATE) RETURNS INT
AS
BEGIN
DECLARE @isLeap INT = 0
IF (YEAR(@myDate) % 400 = 0 OR (YEAR(@myDate) % 4 = 0 AND YEAR(@myDate) %...
October 1, 2014 at 4:19 am
Mohit Dhiman (9/30/2014)
SELECT DATEADD(m,DATEDIFF(m,'19001231',GETDATE()),'19001231')This will give you the month end date for the current month (which can be changed by replacing GETDATE() with whichever other month-date you want)..
And you...
October 1, 2014 at 4:12 am
taylor_benjamin (9/29/2014)
September 30, 2014 at 2:31 am
The "data length" of a row is more complex than simply counting the data characters. Columns have a minimum length, and many of the columns in your table have a...
September 29, 2014 at 9:45 am
arrjay (9/29/2014)
September 29, 2014 at 5:40 am
Koen Verbeeck (9/29/2014)
September 29, 2014 at 5:17 am
Here is your DB2 query reformatted somewhat for clarity. The two subqueries in the WHERE clause are most likely to hit performance due to the non-SARGable predicates. If DB2 has...
September 29, 2014 at 3:59 am
We're using OPENQUERY & linked server to run ad-hoc queries against a DB2 database. We discovered quite early on that DB2 (or possibly the driver) will balk at almost anything...
September 29, 2014 at 2:09 am
If you're looking for a simple and reliable means of obtaining the last date of the current month, try this:
SELECT DATEADD(DAY,-1,DATEADD(MONTH,1+DATEDIFF(MONTH,0,GETDATE()),0))
September 29, 2014 at 2:03 am
Like this?
IF OBJECT_ID('tempdb..#iscr','U') IS NOT NULL DROP TABLE ##iscr
SELECT * INTO #iscr FROM _Iscritto WHERE 0 = 1
IF @cod_fondo = '2100'
BEGIN
INSERT INTO #iscr (<<column list>>)
SELECT <<column list>> FROM _Iscritto...
September 26, 2014 at 9:49 am
Viewing 15 posts - 2,881 through 2,895 (of 10,144 total)