Subtracting Values from Two Datasets in Single Table - sql

I'm trying to basically subtract time to get the time difference in SSRS to take out total working hours. However, I'm getting error "An unexpected error occurred while compiling expressions. Native compiler return value: '[BC30025] Property missing 'End Property'.'." from the available solutions in here or over the internet.
I tried to use lookup as well: =Lookup(Fields!Date.Value & Fields!Employee_Name.Value, Fields!Date.Value & Fields!Name_or_title.Value, Fields!Check_Out_Time.Value, "DataSet2") - (Fields!Check_In_Time.Value) which shows error as enter image description here
Can someone guide me how to get time difference from two different datasets please? I'm new to SSRSSQL

Related

Syntax error: Expected end of input but got "-" at [5:17] error in BigQuery exercise

I`m working with an exercise from the Google Data Analysis Course, that asks me to write and execute the following query:
SELECT
station_name,
ridership_2013,
ridership_2014
ridership_2014-ridership_2013 AS change_2014_raw
FROM
bigquery-public-data.new_york_subway.subway_ridership_2013_present
but every time I try to run it, I get the same error:
Syntax error: Expected end of input but got "-" at [5:17]
I think that the error is the dash from the subtraction between ridership_2014-ridership_2013, but I'm not sure if it`s something from my keyboard or something else,
I'll appreciate some of your help on this,
Thank you!!

ERROR: Limit set by ERRORS= option reached. Further errors for this INPUT function will not be printed

While using the code able I'm getting an error message as below and also I'm getting the output table.
input(put(serv_to_DT_KEY,8.),yymmdd8.)
between datepart(D.throughdate)
and datepart(intnx('day',d.throughdate,31))
Error: INPUT function reported 'ERROR: Invalid date value' while processing WHERE clause.
ERROR: Limit set by ERRORS= option reached. Further errors for this INPUT function will not be printed.
Could you please help
It's not a true error, exactly; it's a data error, which SAS will let by. What it's saying is the value in serv_to_DT_KEY is not a valid yymmdd8 for some records. (The rest of the message, about "limit set by ...", is just SAS saying it's only going to tell you about 20 or so individual data errors instead of showing you every single one, so your log isn't hopeless.)
To fix this you have several options:
If there is a data issue [ie, all rows should have a valid date], then fix that.
If it's okay that some rows don't have a valid date (for example, they might have a missing), you can use the ?? modifier in the informat in input to tell it to ignore these.
Like this:
input(put(serv_to_DT_KEY,8.),?yymmdd8.)
between datepart(D.throughdate)
and datepart(intnx('day',d.throughdate,31))

NodeJS + Express "Error: -2006,\, Can not bind parameter(s)"

My company is working on converting from ColdFusion to NodeJS with Express, I'm running into an error trying to update some data in SQLAnywhere.
I have one update function working with 5 pieces of data. I'm working on my second, with 23 data points, but I'm running into an error stating:
"Error: Code: -2006 Msg: Can not bind parameter(s)."
I can't find any information about this online, not even using the error code. Any help, or pointing me in the right direction, would be appreciated.
Turns out it was trying to save integers into "char" fields on the database. Odd that we never had this issue with ColdFusion, but using "String(…)" around the values seemed to solve the issue.

rpubchem error - collecting data from pubchem

This is my first try at using R to collect data from pubchem. However i am getting the following error every time for every cid that i have used.
library("rpubchem")
get.cid(46926545)
Error in do.call(cbind, unlist(Filter(function(x) !is.null(x), cvals), :
second argument must be a list
Can anyone point out what am i doing wrong. The link for the cid is "https://pubchem.ncbi.nlm.nih.gov/compound/46926545#section=Top"

Dymola Results of checkModel()

checkmodel([Some Model]) opens the GUI "Dymola Messages", tab "Translation" and displays Errors, Warnings, and Messages.
Does anyone know how to write these infos to a logfile or get them as kind of return value of checkModel(). All I've found in the documentation was, that checkModel() only returns a success-boolean. Are these infos saved temporarily somewhere?
Note, that I only want to apply checkModel() but not actually translating the code.
I finally found a solution at least for Dymola 2016 and newer, so if someone is interested - here it is (it is not very user-friendly, but it works):
The key-command is getLastError() which not only returns the last error (as one could think...), but all errors that are detected by checkModel() as well as the overall statistics.
All informations are sampled in one string, in which the last lines looks like:
"[...]
Local classes checked, checking <[Some Path]>
ERROR: 2 errors were found
WARNING: 13 warnings were issued
= false
"
Following operations will return the number of actual errors (for warnings it is more or less the same):
b = checkmodel([Some Model])
s = getLastError()
ind1 = Modelica.Utilities.Strings.findLast(s,"ERROR:")
ind2 = Modelica.Utilities.Strings.findLast(s," errors were found")
nErrors = Modelica.Utilities.Strings.substring(s,ind1+6,ind2) //6 = len(ERROR:)
nErrors = Modelica.Utilities.Strings.replace(nErrors," ","")
nErrors
= "2"
Note:
I used findLast as I know, that the lines of interest are at the very end of the string. So this is significantly faster than using find
This only works, if the line "ERROR: ...." actually exists. Otherwise, the substring call will throw an error.
Of course this could be done in less lines, but maybe this version is easier to read.
NOTE: This will only works with Dymola 2016 and newer. The return-string of getLastError is of a different structure in Dymola 2015 and older.
The following should handle it:
clearlog(); // To start fresh
Advanced.TranslationInCommandLog=true;
checkModel(...);
savelog(...);
This is mentioned in the Dymola User Manual Volume 1, section "Parameter studies by running Dymola a number of time in “batch mode”" on pg 630 or so.