SQL Variables Questions and Answers

Recent IT Questions

1 - 5 of 5
<<PREVIOUS 1 NEXT>>

dynamic temporary table variable usage

We have an sqr (running against a MS SQL Server DB), that references a dynamic temporary table variable in several begin-sql and begin-select statements. I am getting a syntax error in one begin-select statement where I can't resolve the problem. It occurs after the INNER JOIN on the...

View Answer   |  Jun 25 2009  7:53 PM GMT
Dynamic SQL, INNER JOIN, SQL tables
asked by PaminBuckeyeLand

  15 pts.

Delete variable file in SQLRPG

How can I use any variable file in an instruction SQL of DELETE in SQLRPG?

View Answer   |  Jun 4 2009  9:01 AM GMT
DELETE statement, SQLRPG, SQL variables
asked by Samuele

  5 pts.

SQL Server 2005

CAN ANYBODY HELP ME "HOW TO ASSIGN A SQL-STATEMENT IN A VARIABLE". FOR EXAMPLE : TO ASSIGN A STRING IN A VARIABLE, WE DO LIKE THIS: DECLARE @A AS VARCHAR(20) SET @A='HAI' PRINT @A OUTPUT: HAI SIMILARLY HOW TO ASSIGN A SQL-STATEMENT IN A VARIABLE.

View Answer   |  May 8 2009  6:37 AM GMT
SQL Server 2005, SQL statements, SQL variables
asked by Narendar

  30 pts.

pass variable from Foreach loop to stored Procedure parameters

in control flow I run "Execute SQL Task" to retrive array variables like State Code ('AR', 'WI', .. et). Then I run ForeEach Loop Container and pass global variable gv_StateCode into Data Flow, where I run stored proc with one parameter in "OLE DB Source" (like exec sp_StProcname ?) and i assign...

Answer Question   |  Mar 18 2009  8:51 PM GMT
SQL, SQL variables, SQL Parameters
asked by IG1944

  10 pts.

SQL Server trigger , insert result of multiple where clause into a variable

Hi All, I have a select statement that stores the result in a variable,this works fine if there is only one condition and field in the clause.How do I go about it if there is more than one? For example (Working one) SELECT @Variable = (SELECT [Field] FROM [Table] WHERE [FIELD] = Value) But I am...

View Answer   |  Nov 11 2008  8:23 AM GMT
SQL, SELECT statement, Triggers
asked by Jacquesvdm

  20 pts.

1 - 5 of 5
<<PREVIOUS 1 NEXT>>