I have a field called Private_Label_Barcode that I need to read each digit and decided if odd or even. all the odd digits are to be added together, and all the even digits added together. I know that I will need to use a loop. I can't figure how to use the value of the digit found in each...
Below is a simplified version of the command I wrote. If I enter numbers for the sting parameters it works fine, when I enter letters it fails and gives an "invalid column name" showing the sting (ie. 'ABC') I have created other reports with date, number, and sting parameters, they work fine...
I have a cross-tab with date columns and store rows. The dates are dates of message transmission. The cells in the cross-tab is the number of messages sent from store to home office. This report deals with new stores for a range of days (variable). I need to show the number of messages when...
Frederico, I found that, but it requires permissions on the AS400 that I don't think I have.
Skip, for this conversation, I will use Alt. Headings for field names.
dc/vend
ord#
itm1
vendor
sku
loc1
loc2
transYMD
qty ord
ship ymd
qty ship
I may need additional fields later. All values from...
To avoid the 20 questions below is the names of all the fields as listed in System i Navigator.
column name Data Type Length Nullable Default Val Description Alt Heading
TDEL CHARACTER 1 No ' ' DELETE CODE DEL
TFLAG CHARACTER 1 No ' ' DC OR VENDOR ORDER DC/VEND
TCORP DECIMAL 3,0...
I am going through a linked server from my desktop to a AS400 using an ODBC connection To properly connect to a AS400 table with a single member I must use the following
SELECT *
FROM AS400_A.S1018328.NMLIB.NMPTSPL
I need to access a table with multiple members.
Several sources suggested the...
I have the same issue; only 4 parameters, 2 dynamic and 2 static.
The report is based on a command. The "tables" for the dynamic parameters are also commands (needed to limit the data returned based on events for one company division). I will be interested on the answer to this one too!
Finally found the answer, thanks everyone for your help!
When converting a date it must first be converted to a charater string, when converted it also flips the data in the correct order (YYYYMMDD) matching the database. However, in my database it also adds dashes between field parts (i.e...
I set the parameter field up in SELECT, so I could see the output.
CHAR ({?End Date}) as TEST_END
puts the date in the correct format of YYYYMMDD.
When I try to use DECIMAL to convert the string to a number nothing is returned in the field (TEST_END) in the report.
DECIMAL (CHAR ({?End...
The closest that I could come up with that "command" would accept was
sales.DATE >= DEC ((SUBSTR (CHAR ({?Begin Date}), 5, 4)) ||
(SUBSTR (CHAR ({?Begin Date}), 1, 2)) ||
(SUBSTR (CHAR ({?Begin Date}), 3, 2)))
and sales.DATE...
I used your idea. I built a test report, Crystal command does not give any errors and accepts the code.
FYI- I can't use "CONVERT" instead of "CAST" this system doesn't like it
Sales.DATE >= CAST (CHAR ({?Begin Date}) as DEC(8, 0))
and Sales.DATE <= CAST (CHAR ({?End Date}) as DEC(8, 0))
But...
I am using crystal command to write my own SQL. I need to add a parameter (in the command window, not in the report) that is the users see as a date but I need to convert that to a number format YYYYMMDD to match the records in the database (they will not change the database). They insist on...
Writting reports using "command" accessing an AS/400 database using IBM iSeries ODBC Driver DB2 UDB. Most of the standard SQL commands don't work. ie.
currentdate needs to be curdate () and it will not accept any back dating (-1).
convert can not be used only cast
Does anyone know of a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.