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

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!!

Related

Could someone take a look at this error with rMVP?

I'm wanting to use the rMVP.report() function but constantly running into problems. This is what the code looks like:
library(rMVP)
MVP.Report("LV1.csv",
plot.type="m",
multracks=TRUE,
threshold=c(0.05/299685),
threshold.col=c("red","blue"),
bin.size=1.5e6,
outward=TRUE,
file.type="jpg",
memo="",
band=0.5,
dpi=300,
highlight=NULL)
Here is what the error is:
Error in 1:(ncol(Pmap) - 3) : argument of length 0
If anyone is familiar with rMVP and it's functions let me know if you can help with this!

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.

Arduino Errors with sainsmart sheild

http://pastebin.com/86JXkUBf
This is my Arduino code that I am using as a status indicator for me and my roommate. The code as working completely fine until I decided to be able to edit the first line on the display, which is the sainsmart LCD keypad shield. Now, when I verify the code in the arduino IDE, i get the following set of errors:
sketch_jul22b.cpp:15:81: error: expected unqualified-id before '\x593a'
sketch_jul22b.cpp:15:81: error: expected ‘}’ before '\x593a'
sketch_jul22b.cpp:15:81: error: expected ‘,’ or ‘;’ before '\x593a'
sketch_jul22b.cpp:15:88: error: expected declaration before ‘}’ token
I would appreciate it very much if somebody would tell me:
1) what these errors mean.
2) How to resolve them.
Thanks!
corrected code that compiles.
http://pastebin.com/j5B37UUP
#praks411 was correct, but there were some typo's and need to use lcd.print instead of lcd.write.
I'm not sure exactly which line you have edited but looking at your code it seems to me that the status String must be in double quotes. Also there should be , instead of . after "Awesomeness"
So instead of
String top[] = {'Status:', 'Adam:', 'Oliver:', 'Adam & Oliver:', 'Awesomeness'. 'OBEY:'};
You should have
String top[] = {"Status:", "Adam:", "Oliver:", "Adam & Oliver:", "Awesomeness", "OBEY:"};

Sort by minute doesn't work

I'm trying to sort my photos by hour and minute but it will not catch the minutes - it's just keep saying that nothing exists for that hour and minute. If I'm trying to sort only after the hours, it works perfectly. I have tested WHERE DATEPART(minute, exif_taken) = "'.$_GET['min'].'" but I'm keep getting the following error message:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION gallery.DATEPART does not exist' in ...
I'm using WAMP Server with default settings except for some modules activated for both Apache and PHP like mod_rewrite and php_exif. Here's how my SQL query looks like:
SELECT *
FROM photos
WHERE HOUR(exif_taken) = "'.$_GET['h'].'"
AND MINUTE(exif_taken) = "'.$_GET['min'].'"
ORDER BY exif_taken DESC
$_GET['h'] is the hour and $_GET['min'] the minute.
How can I solve my problem?
Thanks in advance.
Are you using MySQL? If true, DATEPART() function doesn't exist. You shoul use MINUTE() function..
Here is the complete documentation.
https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html
BTW, for god sake, sanitize your _GET vars before send to the SQL query. You are exposing your system to SQL Injections.
In some odd way it's working perfectly now with the SQL query I posted in my question O.o