sybase Select query in unix - unix

//bin/isql -b -SF2_PR_LV_SL -UAA -bb -DFH2 -w200 -Jroman9 -b
fre.sh[4]: //bin/isql: not found.
SET NOCOUNT ON
fre.sh[5]: SET: not found.
GO
fre.sh[6]: GO: not found.
date +%Y%m%d
dat=20180801
uSE FLASH2
fre.sh[8]: uSE: not found.
GO
fre.sh[9]: GO: not found.
CREATE TABLE
fre.sh[10]: CREATE: not found.
fre.sh[11]: Syntax error at line 12 : `(' is not expected.
someone explain me , How this can be solved?

Related

Trimmomatic-0.39 error message "Unknown option -baseout ..."

I have used Trimmomatic-0.39 few times already for trimming some sequencing data. This time I tried the option -baseout as stated in the manual but it does not recognise it as a valid option and the command does not run. If I run the command, as I usually I do with all the output files listed, it works though.
I type in the command line:
java -jar trimmomatic-0.39.jar PE -phred33 -trimlog trimmed_file18_log.log -baseout file18.fastq.gz file18-R1.fastq.gz file18-R2.fastq.gz ILLUMINACLIP:NexteraPE-PE.fa:2:30:10 MAXINFO:25:0.2 MINLEN:20
What I get back is:
Unknown option -baseout file18.fastq.gz
Usage:
PE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog <trimLogFile>] [-summary <statsSummaryFile>] [-quiet] [-validatePairs] [-basein <inputBase> | <inputFile1> <inputFile2>] [-baseout <outputBase> | <outputFile1P> <outputFile1U> <outputFile2P> <outputFile2U>] <trimmer1>...
or: .....
I get back the same error message even if I move the '-baseout file18.fastq.gz' option after '...jar PE' and before the list of all the other options.

ERROR: Attribute '' cannot be parsed: Cannot read property 'dataType' of undefined

I was creating document_types table using following cli command
sequelize model:create --name User --attributes name:string, username:string, email:string, password:string
Solution: remove the space after comma between different attributes to avoid the error, correct command would be:
sequelize model:create --name User --attributes name:string,username:string,email:string,password:string

Teradata BTEQ error

I am trying to run the below bteq script in unix.
BTEQ -- Update.txt
.LOGON i.p/username,password
.set width 132
.set errorout stdout
sel date, time;
.set maxerror 1
Nonsequenced validtime
update SCHEMA_1.TABLE_1
set ef_dtm = period( timestamp '1900-01-01 00:00:00.999999',
end(ef_dtm))
where begin(ef_dtm) > CURRENT_TIMESTAMP
and end(ef_dtm) = to_date('12/31/9999', 'mm/dd/yyyy')
.quit
But i am getting the below error
*** Failure 3706 Syntax error: Invalid use of JSON entity reference syntax on non-JSON type.
Statement# 1, Info =0
Exiting BTEQ... RC (return code) = 8
Please note that if I run the update statement along with nonsequenced
valid time directly in SQL Assistant, it works without any issue.
Can you please help me fix this?
Let me know if you need any more info.
User semicolon at the end of update statement.

Teradata 3706 error: OTRANSLATE

I am using Teradata SQLA 14.01 and want to use the OTRANSLATE function, but it is not working. I have checked the DBC.FunctionsV table to ensure that the function is defined in the system, which it is. However, even when I use the sample code;
SELECT OTRANSLATE('TD13.0 is the current database version','3', '4');
I am faced with a 3706 error:
Syntax error: expected something between '(' and the string 'T'
keyword.
All help will be greatly appreciated!!

Avoid message "-​- Loading resources from .sqliterc"

Minor problem, nevertheless irritating : Is there a way to avoid the following message from appearing each time I make a query :
-- Loading resources from /Users/ThG/.sqliterc
As a stupid workaround, this works:
<. sqlite your_sqlite.db 'select * from your_table'
This is because the current code does this:
if( stdin_is_interactive ){
utf8_printf(stderr,"-- Loading resources from %s\n",sqliterc);
}
Forcing a stdin redirect thwarts this due to this piece of code:
stdin_is_interactive = isatty(0);
This works as well:
sqlite -batch your_sqlite.db 'select * from your_table'
due to this piece of code:
}else if( strcmp(z,"-batch")==0 ){
/* Need to check for batch mode here to so we can avoid printing
** informational messages (like from process_sqliterc) before
** we do the actual processing of arguments later in a second pass.
*/
stdin_is_interactive = 0;
}
but it's longer, so kind of defeats the purpose.
I know that this question is PRETTY old now, but simply deleting '/Users/ThG/.sqliterc' should solve the problem. '.sqliterc' is a configuration file for sqlite's interactive command line front-end. If you don't spend a lot of time in there, you won't miss the file.
That resource msg comes out on stderr, and it's followed by a blank line, so you could get rid of it with something like this (wrapped up in a script file of its own):
#!/bin/bash
sqlite3 -init /your/init/file /your/sqlite3/file.db "
your
SQL
cmds
" 2>/dev/null | sed -e1d
When using sqlite in shell scripts, you usually don't even want your ~/.sqliterc to be loaded at all. This works well for me:
sqlite3 -init <(echo)
Explanation:
-init specifies the file to load instead of ~/.sqliterc.
<(echo) uses Process Substitution to provide a path to a temporary empty file.
A bit late but #levant pied almost had the solution, you need to pass an additional -interactive to silence the --loading resources from.
$ sqlite3 -batch -interactive
SQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.
sqlite> .q
You can simply rename your config file to disable the warning. And revert the rename to keep the configuration after use.
I use the following:
#suppress default configuration warnings
mv $HOME/.sqliterc $HOME/.backup.sqliterc
# sqlite3 scripts...
#revert
mv $HOME/.backup.sqliterc $HOME/.sqliterc

Resources