Getting an Error in my Iif statement
I am trying to check to see if there are more than 20 characters in a field and if so return the data formatted in two different ways.
This works...
=Iif(Len(Fields!Street_Address_1.Value)>20,"LongAddress","ShortAddress")
This works...
=Iif(Len(Fields!Street_Address_1.Value)>20,"LongAddress",Fields!Street_Address_1.Value)
But for this, it works if the address is more than 20 characters and shows Error if it is less.
=Iif(Len(Fields!Street_Address_1.Value)>20,(Ucase(Left(Fields!Street_Address_1.Value,20))&Lcase(Right(Fields!Street_Address_1.Value,Len(Fields!Street_Address_1.Value)-20))),Fields!Street_Address_1.Value)
I also tried it backwards. And got the same result.
=Iif(Len(Fields!Street_Address_1.Value)<20,Fields!Street_Address_1.Value,(Ucase(Left(Fields!Street_Address_1.Value,20))&Lcase(Right(Fields!Street_Address_1.Value,Len(Fields!Street_Address_1.Value)-20))))
What am I missing?
Or are you just trying to make the first 20 characters uppercase and the rest lowercase?
This is what I am trying to do, but only if there are more than 20 characters in the address line.
I WANTED to make the first 20 Bold and the rest Normal, but could not figure out how to do that at all. Bonus points if anyone comes up with that method. But I am pretty sure Vishal has the right idea.
Hi New,
You can make first 20 charactes bold. I found below article on how to achieve this:
http://www.sqlchick.com/entries/2010/10/31/using-different-formats-within-a-single-textbox-in-ssrs.html
- Vishal
SqlAndMe.com
Similar Messages
-
Why am I getting an error in this Select statement ?
Any reason why this SQL string does not work on Oracle ?
SELECT * From kestjori.vatnshaed_web WHERE TIEINS = '1' AND TIDTIM BETWEEN To_Date('01.01.2000') AND To_Date('27.10.2000');
TIEINS is of the datatype NUMBER(3)
TIDTIM is of the datatype DATE
I am getting this error :
SQLException: [ORACLE][ODBC Oracle Driver][Oracle OCI] ORA-00911: invalid character
With thanks in advance,
Oskar Jenssoni think there is one exact problem in sql and other is optional.
1. u write field
TIEINS is of the datatype NUMBER(3)
but in query in where part u write
where TIEINS = '1'
so problem is of data type.
second optional problem can be removed by given date format in to_Date() function.
like To_Date('27.10.2000','dd.mm.yyyy')
i hope it will help u
bye
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Oskar Jensson ([email protected]):
Any reason why this SQL string does not work on Oracle ?
SELECT * From kestjori.vatnshaed_web WHERE TIEINS = '1' AND TIDTIM BETWEEN To_Date('01.01.2000') AND To_Date('27.10.2000');
TIEINS is of the datatype NUMBER(3)
TIDTIM is of the datatype DATE
I am getting this error :
SQLException: [ORACLE][ODBC Oracle Driver][Oracle OCI] ORA-00911: invalid character
With thanks in advance,
Oskar Jensson<HR></BLOCKQUOTE>
null -
I am trying to learn HANA on my own.i have product id,product name,delivery date and Grossamount in my calculated view.i am trying to create calculated column where i need Grossamount in two columns based on delivery date.I have 2012 and 2013 as values for my delivery date.so i have created two column as grossamount_2012 and grossamount_2013.if i have delivery date as 4thdec,2012 i want the grossamount value to be in coloumn grossamount_2012 and the grossamount_2013 should be blank.i have written an expression like this
if("Deliverydate" <= longdate(2012-12-04),"Grossamount","0")
and it looks like this is wrong.i am getting the text Grossamount rather than values for that field in my output.so can anyone help me please?Hi chandra
i am trying to get the same result by using sql script and CE functions.i have written the following code
select A."PRODUCTID",
E."TEXT" as "PRODUCTNAME",
C."COUNTRY",
D."DELIVERYDATE",
Sum(D."GROSSAMOUNT") as "GROSSAMOUNT"
from "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.Products" as A
inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.BusinessPartner" as B
on A."SUPPLIERID" = B."PARTNERID"
inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.Addresses" as C
on B."ADDRESSID" = C."ADDRESSID"
inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Purchase.Item" as D
on A."PRODUCTID" = D."PRODUCTID"
inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Util.Texts" as E
on A."NAMEID" = E."TEXTID"
GROUP BY A."PRODUCTID",E."TEXT",C."COUNTRY",D."DELIVERYDATE";
this is working fine but i want to split the grossamount based on current year and last year.Any idea how to do this
In calculation view using script can we use if and case statements? -
Getting error message "missing ; before statement 24"
Hello,
I'm getting the error message "missing ; before statement 24" in the following script:
//Create a variable to hold the document object
var StartDate = (xfa.form.form1.page1.signature.StartDate.rawValue);
var EndDate = (xfa.form.form1.page1.signature.EndDate.rawValue);
var assocName = (xfa.form.form1.page1.signature.assocName.rawValue);
var assocID = (xfa.form.form1.page1.subForm1.assocID.rawValue);
var assocEmail = (xfa.form.form1.page1.subForm1.assocEmail.rawValue);
var assocExt = (xfa.form.form1.page1.subForm1.assocExt.rawValue);
var assocDept = (xfa.form.form1.page1.subForm1.assocDept.rawValue);
var mgrName = (xfa.form.form1.page1.subForm1.mgrName.rawValue);
var mgrEmail = (xfa.form.form1.page1.subForm1.mgrEmail.rawValue);
var salariedHourly = (xfa.form.form1.page1.subForm1.salariedHourly.rawValue);
var directReports = (xfa.form.form1.page1.subForm1.directReports.rawValue);
var perfRating = (xfa.form.form1.page1.subForm1.perfRating.rawValue);
var howLongWorking = (xfa.form.form1.page1.request.howLongWorking.rawValue);
//SUBMIT DATE
if (StartDate == "") Then
xfa.host.messageBox( "Please enter a Submit Date" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.StartDate");
//HIRE DATE
elseif (EndDate == "") Then
xfa.host.messageBox( "Please enter a Hire Date" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.EndDate");
//NAME OF ASSOCIATE
elseif (assocName == "") Then
xfa.host.messageBox( "Please enter your Name" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.assocName");
//ASSOCIATE ID
elseif (assocID == "") Then
xfa.host.messageBox( "Please enter your ID" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.assocID");
//ASSOCIATE EMAIL
elseif (assocEmail == "") Then
xfa.host.messageBox( "Please enter your email address" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.assocEmail");
//ASSOCIATE EXTENSION
elseif (assocExt == "") Then
xfa.host.messageBox( "Please enter your telephone extension" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.assocExt");
//ASSOCIATE DEPARTMENT
elseif (assocDept == "") Then
xfa.host.messageBox( "Please enter your department" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.assocDept");
//MANAGER NAME
elseif (mgrName == "") Then
xfa.host.messageBox( "Please enter your manager's name" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.mgrName");
//MANAGER EMAIL
elseif (mgrEmail == "") Then
xfa.host.messageBox( "Please enter your manager's email address" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.mgrEmail");
//SALARIED HOURLY
elseif (salariedHourly == "") Then
xfa.host.messageBox( "Please enter whether your are salaried or hourly" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.salariedHourly");
//DIRECT REPORTS
elseif (directReports == "") Then
xfa.host.messageBox( "Please indicate whether you have any direct reports" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.directReports");
//PERFORMANCE RATING
elseif (perfRating == "") Then
xfa.host.messageBox( "Please certify your last performance rating" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.perfRating");
//HOW LONG WORK
elseif (howLongWorking == "") Then
xfa.host.messageBox( "Please indicate how long you anticipate working this arrangement" );
xfa.host.setFocus("xfa.form.form1.page1.questions.howLongWorking");
else
Button6.execEvent("click");
page2.presence = "visible";
EndIf
I've been hunting for several hours and can't seem to find or correct the problem. Can anyone help?
Thanks,
MDawnI'm still having trouble. I tried to change the script to JavaScript. Now I'm getting "subForm1 not defined" error message. But it appears that subForm1 is set up properly.
Any thoughts?
Thanks,
MDawn -
I've been getting an error message lately which states the following:
Web Sync could not initialize properly. Check that Polar Daemon is running and start Web Sync again. To restart Polar Daemon you need to run 2 commands in Terminal Start Applications>Utilities>Terminal. To stop Polar Daemon which is already running, write a command”sudo launchctl unload/library/launch daemon/fi.polar.polard.plist.” and press enter. Enter your password when required. If Polar Daemon is not running, “error unloading” message appears. Ignore this error message. Write “sudo launchclt load/library/launch daemons/fi.polar.polard. plist” and press enter to run Polar Daemon.
Is this something I should be concerned about, and if so, what do I do about it?
ThanksThat error message comes from third-party software that you installed. If it isn't working, either remove it according to the developer's instructions, reinstall it, or refer to the developer for support. Back up all data before making any changes.
-
Import error imp-00017: following statement failed with oracle error 1659:
Hi all,
I am trying to import a file (dmp) which is of 1.63GB size,
when I type
imp
dbname/pwd@db
c:\filepath
30720
no
no
yes
yes
yes
I am getting the error imp-00017: following statement failed with oracle error 1659:
-- end it says Ora-01659 unable to allocate minextents beyond 1 in tablespace USERS
--unable to create INITIAL extent for segment in tablespace USERS
--import terminated successfully with warnings
when I looked into
select maxbytes,file_name from dba_data_files where tablespace_name='USERS';3.4360+10 c:\oracle\product\10.2.0\oradata\orcl\users01.dbf
kindly help me in solving this is.
Regards,
aak
Edited by: AAK 460425 on Apr 12, 2009 6:33 PMThanks,
select bytes from user_free_space where tablespace_name='USERS'
BYTES
458752
720896
458752
655360
43384832
is the size less?
My apology I have updated this in the below thread, which is same as this one.
Re: Import error -
Error while gather schema stats
Hi,
I am getting the error while gather schema stats
-1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
Unable to correctly update the history table - fnd_stats_hist.
-1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
-SagarAriz,
The FND_STATS package provides procedures for gathering statistics for Oracle Applications database objects. It also provides procedures
for storing the current statistics in a table (FND_STATTAB) and restoring them back. This package also facilitates the gathering of some statistics in parallel. This package calls the DBMS_STATS package.
The FND_STATS package also has procedures to populate the FNDSTATS_HIST_* table to record the historical information of time taken for gathering the
statistics for the different types of objects.
Famy -
Broker Error : type="subscribe" source="statement" info="invalid"
i ran these on the database
use DB
GRANT CREATE PROCEDURE TO USER
GRANT CREATE QUEUE TO USER
GRANT CREATE SERVICE TO USER
Use DB
GRANT SUBSCRIBE QUERY NOTIFICATIONS TO USER
Use DB
GRANT RECEIVE ON QueryNotificationErrorsQueue TO USER
ALSO ENABLE_BROKER
this is the query
select column(char(12) FROM dbo.table
running a profile i get this error
type="subscribe" source="statement" info="invalid"
I've looked here
http://msdn.microsoft.com/en-us/library/ms189308.aspx
and here
http://msdn.microsoft.com/en-us/library/aewzkxxh(VS.80).aspx
can't figure this out....drive'n me crazy
it's just on this database...i can get it to work on other databasesthis is the query
select column(char(12) FROM dbo.table
running a profile i get this error
type="subscribe" source="statement" info="invalid"
It seems that the syntax of SELECT statement is incorrect, which should be like "SELECT column_name [,column_name2] FROM dbo.table". Please let me know if I am missing something here.Best Regards
Alex Feng | Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] -
All,
I have the below IIF statement in SSRS report based on a sharepoint list. However I get #Error only on certain lines
For example when Item_Name = P001-P384D630Z01
I am sort of stunned at this point. All the other lines work except the one with above item name. If I remove the MF5 Mod Center part of the iif then everything works.
=
Iif((mid(Fields!Item_Name.Value,8,1)= 3 OR mid(Fields!Item_Name.Value),8,1)=4) AND LEFT(TRIM(Fields!Project_No.Value),1) =8, "MF5 Mod Center",
Iif(Left(Fields!Project_No.Value,1)="3","HOU MOD",
Iif(Left(Fields!Item_Name.Value,3) = "RDC","RDC",
Iif(Left(Fields!Item_Name.Value,4) = "P001","Overseas",
Iif(IsNothing(Fields!Engineering_Status.Value), "Pre-engineering",
Iif(Fields!Engineering_Status.Value="P.C. Finished", "Production",
Fields!Engineering_Status.ValueIt's working after removing the "-" in the item_name if anyone is wondering.
=
Iif(Left(Fields!Project_No.Value,1)="3","HOU MOD",
Iif(Left(Fields!Item_Name.Value,3) = "RDC","RDC",
Iif(Left(Fields!Item_Name.Value,4) = "P001","Overseas",
Iif(IsNothing(Fields!Engineering_Status.Value), "Pre-engineering",
Iif(Fields!Engineering_Status.Value="P.C. Finished", "Production",
Iif((mid(replace(Fields!Item_Name.Value,"-",""),8,1)= 3 OR mid(replace(Fields!Item_Name.Value,"-",""),8,1)=4) AND LEFT(TRIM(Fields!Project_No.Value),1) =8, "MF5 Mod Center"
,Fields!Engineering_Status.Value -
when my lightroom opens up I keep getting an error message that states, "Lightroom encountered an error whne reading from its preview cache and needs to quit" I have relaunched it a number of times and keep getting the same message. Any thoughts on how to fix this?
You need to delete your preview cache and have Lightroom rebuild it. Cache location can be found here.
https://helpx.adobe.com/lightroom/kb/preference-file-locations-lightroom-41.html
Why And How To Clear Your Lightroom Cache - Lightroom Fanatic -
I just downloaded itunes onto my new laptop and I am trying to burn songs onto a cd that I had purchased previously and I am getting an error message that states I must authorize this computer. What does that mean?
If the computer's running Mac OS X, move the cursor to the very top of the computer's screen, click on Store, and choose Authorize this Computer.
If the computer's running Windows, press the Alt and S keys and choose Authorize this Computer, or click here, follow the instructions, click on Store in the menu bar, and choose Authorize this Computer.
(95452) -
I get an error that states "This application has failed to start because MSVCR80.dll was not found". Reinstalling does not help.I have tried removing iTunes and reinstalling, I have tried "repairing" option at reinstall, nothing seems to work.
Read this:
iTunes 11.1.4 for Windows - Unable to install or open - MSVCR80 issue -
I keep getting an error message when downloading a new app which states " Zinio and 5 other apps cannot be purchased at this time" and then it let's me purchase the app that I was looking at? Can anyone explain that?
apple_master New Delhi, India
This solved my questionRe: Unable to Purchase
Apr 16, 2012 10:22 PM (in response to eight4seven)
This worked for someone
I had this problem for about six weeks. I was following this forum but was too unsure of what might happen to try the fixes that were suggested.
About two weeks ago I decided to delete the downloads.28.sqlitedb file (usingDiskAid(a free program), on a PC running Windows 7). The original downloads.28.sqlitedb was 936 KB. The new one that the system created is 80 Kb., and has stayed at about that size. After about four days I also deleted all the other contents of the Download folder. Ten days later and still no more problems. Downloads are much quicker, nothing greys-out (as was happening frequently before).
Everything has worked well since with no more error messages.
I am using an iPod 4G, iOS 5.1 (originally iOS 5.0). I do not have a manifest file, and as far as I know, have not had one. DiskAid can search the whole "hard drive" on the iPod.
Deleting downloads.28.sqlitedb and the contents of Downloads worked for me. -
Getting an error in MERGE statement
Hi,
I am getting an error "missing keyword" when I execute the MERGE statement.
Here I have attached copy of MERGE statement which I am trying to execute.
(My requirement is if I find matching record then insert again it's a business requirement. And if not then set flag)
MERGE INTO t1
USING t2
ON (conditions)
WHEN MATCHED THEN
INSERT (column list from t1)
VALUES (from t2)
WHEN NOT MATCHED THEN
UPDATE
SET ... ;
Can someone guide me?
Thanks,This is why I told you yesterday in this thread...
Need suggestion in MERGE Statement
...that what you're asking is the opposite of the way MERGE works.
Guess you didn't want to believe me. -
Getting time_out Error in report bcos of SQL Statement!
Hi Experts,
I am getting Time_out error in my big program because of Select statement.I have checked in SQL Trace AND fuond the message
"SQL0104N An unexpected token "vakey" was found following "umh
kschl". Expected tokens may include: ",". SQLSTATE=42601"
I have given the following code and SQL statement where the error is getting occured.Please help.
TYPES: BEGIN OF ty_vakey1,
vakey TYPE vakey,
END OF ty_vakey1,
ty_t_vakey1 TYPE HASHED TABLE OF ty_vakey1 WITH UNIQUE KEY vakey.
DATA: ih_vakey1 TYPE ty_t_vakey1,
wa_vakey1 TYPE ty_vakey1,
wa_vakey TYPE ty_vakey.
LOOP AT i_vakey INTO wa_vakey.
wa_vakey1-vakey = wa_vakey-vakey.
COLLECT wa_vakey1 INTO ih_vakey1.
CLEAR wa_vakey1.
ENDLOOP.
IF ih_vakey1 IS NOT INITIAL.
Here it is required to select the Key field and so cannot be used in Where condition
SELECT knumh "Condition record number
kschl "Pricing conditions
vakey "Variable Key
datab "Valid-From Date
datbi "Valid To Date
FROM konh
INTO TABLE i_konh
FOR ALL ENTRIES IN ih_vakey1
WHERE vakey EQ ih_vakey1-vakey . "#EC CI_NOFIELD
Here #EC CI_NOFIELD is used because the key field of the table konh ( ie knumh)
is to be selected and so is not used in the WHERE condition above
IF sy-subrc NE c_0.
No data found for specified criteria
MESSAGE i036.
LEAVE LIST-PROCESSING.
ENDIF.
Thanks&Regards,
SarkarCheck if i_konh definition matches the fields in the SELECT statement.
Also, since you're not using the primary key when selecting from KONH table, such program by design is going to run forever and may time out eventually. Usually KONH is a very large table. Not sure what's the purpose of this program, but I'm pretty sure there must be some other way to program this. There are actually some standard FMs that read the conditions.
A secondary index might help, but only as a last resort.
Maybe you are looking for
-
Adobe lightroom has stopped working
hey,adobe lightroom has stopped working
-
CCMS alert for update deactivation
Hi, we are planning to set one CCMS alert to get upon deactivation of update in SM13. Any help would be appreciated.. Thanks Dash
-
N8 - Proximity Sensor During Calls is Killing me, ...
Hi guys again and again .. the proximity sensor is driving me crazy almost 90% of my calls faces End mute hold and bla bla bla ... the cheek keeps touching the screen and hillarious clicks are made during calls ... i swear every single call faces end
-
Use the Flash uncompressed XFL file format with a source control system to enable designers and developers to collaborate on Flash projects. Contributors can edit different assets simultaneously and see updated assets as soon as they are checked in.
-
Clicking "Download now" on the "Download a free trial of Acrobat X Pro" is not working. Any help? I even opened an account and logged in and it still did not work.