Questions tagged [declare]

Use this tag for questions related to declare, which is usually meant for declaring variables, statements, etc.

736 questions
-1
votes
1 answer

SQL Function with Declare Variable

I have to create a function in SQL which doesn't take any parameter but which returns a table with multiple information. However, within my function I have to include a variable that I declared which contains coordinates. I thus have different…
-1
votes
1 answer

I wanna know how to read bluetooth sensor

#include int blueTx=2; int blueRx=3; SoftwareSerial mySerial(blueTx,blueRx); const int ledpin=8; const int ledpin1=9; const int ledpin2=10; const int sensorpin=A0; void…
C.P.O
  • 1
-1
votes
1 answer

What does the bash' builtin declare -n z do with the z parameter?

I would love to know how bash' declare -n option works when given only a single argument. For example: declare -n z echo "${z}" # "" (empty string as expected) z="somevalue" echo "${z}" # "" (empty string) declare -n z echo…
melvio
  • 762
  • 6
  • 24
-1
votes
2 answers

Is there any way to achieve this in a MySQL statement?

What I am trying to do https://i.stack.imgur.com/QzsCT.png SELECT message, "Need to add user here" FROM database WHERE source="Device Thresholds"
-1
votes
2 answers

How to compare column values to declared variable

I was asked this interview question. --Without modifying the following code: DECLARE @StartDateInput SMALLDATETIME = '1/1/2018', @EndDateInput SMALLDATETIME = '1/1/2018' --Modify the following query so that it will return contacts…
YHapticY
  • 177
  • 11
-1
votes
1 answer

How do i declare multiple items in a for loop in python

alright, So I'm working on a small python Command-line calculator, this was just a test: import time calc = print("\n what calculation do you want to use\n") time.sleep(1) menu = print(" MENU:\n **********\n mult for multiplication\n add for…
-1
votes
3 answers

Declare table variable issue in SQL Server

I want to declare a table variable and I followed the steps in this page but I get error on the line SELECT @StdRevenue;. It seems that I need to declare the variable - which I did. The table Purchasing.ProductVendor: My code DECLARE @StdRevenue…
Osca
  • 1,588
  • 2
  • 20
  • 41
-1
votes
1 answer

What's the correct way to declare var in node js?

I'm looking at some code in an existing project and came across a js file containing one line: declare var __DEV__: boolean; There is a syntax error that says: Expected ; but found var I tried removing the declare to change the line to: var…
Manaar
  • 202
  • 4
  • 15
-1
votes
1 answer

MySql trigger not works

I have 3 tables tbl_payments(pay_id,date,amount,description,-------) tbl_pay_trans(pay_id,trans_id) tbl_transactions(trans_id,trans_date,trans_amount,trans_description,-----) 'tbl_transaction' has the same data from the 'tbl_payments' along with…
ashen25
  • 29
  • 7
-1
votes
1 answer

How to declare cursor in phpmyadmin?

When I add this code I have an error and I can't able to repair it. DECLARE c1 cursor FOR SELECT i FROM integers; OPEN c1; FETCH c1 INTO L1; FETCH c1 INTO L2; FETCH c1 INTO L3; FETCH c1 INTO L4; FETCH c1 INTO L5; FETCH c1 INTO L6; CLOSE c1; …
gushy22
  • 9
  • 6
-1
votes
2 answers

Trying to set context and it's not an enclosing class. Ideas? :)

Problem I'm having: 4th line down I get an error saying "com.example.wifilocator.MainActivity" is not an enclosing class Code in question(From MainActivity) - 4th line: class wifi { int signalStrength = 0; int loopToggle = 0; Context…
-1
votes
2 answers

Android Java Query String Dynamic Values after Declare Variable

How concatenate in (?) String of a Query? Or %s like php... I know make with + but is not the case! I need Query Change the String Value like PHP using ? or %s (similar in Android Java)... package yyy.yyy.yyy.yyy.actions; import…
-1
votes
1 answer

Declare Instance of Class with Dynamic Name

So I have created a Class called SnakeItem, I want to create a new instance of the snake item when the snake grows, they follow a naming convention of snake_Piece_[NUMBER]. There is already snake_Piece_0 and I want to declare a new instance in the…
ATaylor
  • 11
  • 3
-1
votes
1 answer

sql - problems with declare

I have seriously no idea what is wrong here.. USE [PRR_NEW] DROP FUNCTION [dbo].[fA_20] GO CREATE FUNCTION [dbo].[fA_20] ( @Id bigint = 10 ) RETURNS TABLE AS RETURN ( declare @m table ( VatIdGA nvarchar(16), VatIdCAT…
-1
votes
2 answers

T-SQL query gone wrong exec not in table

I'm trying to build a query which puts his output in a table. The exec(@inloop_query) doesn't know a declared table from before. (that part between the ------------------ Is this possible or do I try to do something that doesn't work? please…
hexedecimal
  • 279
  • 1
  • 2
  • 9