Quantcast
Channel: Questions in topic: "variables"
Browsing all 49 articles
Browse latest View live
↧

Results of Sql to a Variable

I have a financial query that uses Sum() multiple times in different calculations. The query is very slow because the sum() function has to rerun multiple times in the query. Is there a way to store...

View Article


SSIS Variables with xml

I want to use an xml path and assign the results to variables within an ssis package. I keep getting errors that it will not assign the variable. I am converting a flat table wihch has email addresses...

View Article


How to use variables and fields in Where clause in Stored Procedure

Hi, I created a SP with following SQL statements and declarations. Individually they are working fine but when called through stored procedure error msg as mentioned below appears. Please help. ====...

View Article

Values to Jobs

Hi, I have a situation where I am executing a package with variables using JOB. I need to dynamically pass the package variable values when I am calling the JOB. Is there any way to do it other than...

View Article

Problem in executing the Activex script on DTS Package

I have a dts package in Sql server 2000 which has three global variables in it. The script run as expected when i run it manually. But when i close the dts package and then run it by right clicking it...

View Article


Declare Variable

I am trying to declare the following variable. calmonth comes from table so I get an error that it is invalid column name. I want to use something like the %type attribute but is that available in...

View Article

Dynamic varchar variable

I want to create a dynamic varchar variable like 'B0001'. if the last charcater of the variable exceeds 9 then the variable should look like 'B0010' and if the last character exceeds 99 the variable...

View Article

Is it possible to roll back a date when a field ID changes?

![alt text][1] Greetings all, I am needing to know is it possible in SQL Server 2008 R2 to make a date change as a particular row id changes? I have to recreate a sales import process. I always grab...

View Article


SSIS Variables in For Loop

I am trying to run a discrete extract for six consecutive months. I have set a Global variable @[User::startDate] at the package level. I have Configured the for loop as follows: InitExpression =...

View Article


SSIS - PASSING VARIABLES IN AS ORACLE DATE

I am trying to use a date populated in an ssis package inside of a query to pull from an oracle table. My script will be a variable called in the ole db source so in this variable - called MyOraclePull...

View Article

Why can't I select from a table name defined as a variable

Depending on the season, I have to select from the appropriate table (stored in a configuration table). A simplified version of it is below (does not work) DECLARE @TableNameTY varchar(15) set...

View Article

Need to use the contents of a field in a table select

Need to use the contents of a field as a table select. For example, my table (ATest) contains a field name (selection_id). The contents of the field contains a table name (selection_12345) that I need...

View Article

how to declare range of variables (Ex: declare @rno1 numeric, @rno2 numeric,...

how to declare range of variables (Ex: declare @rno1 numeric, @rno2 numeric, @rno3 numeric, @rno4 numeric, .....@rno100 numeric)

View Article


Table Variables with Linked Server

I am trying to match a small record set (500 records) with a huge dataset on a linked server...the linked server tables have about 2 million records so i want all the processing to occur remotely and...

View Article

Error when EXEC is used with a temp table variable

This is a simplified version of what I am doing. I am building a sql statement using a loop, which creates code for a pivot table. When I run this with the select statement it runs fine, but when I use...

View Article


SSIS - Variable driven connection string

I wonder if anyone can help. I need to create a connection string that will get it's database and server details from a table. I have created variables, populated them, returned the details to check...

View Article

Deleting Specific Number of Records Per id

We have 67 id's each of which contain x number of emails. So id 1 may have 10000, id 2 may have 12,350... The client wants 12,500 per id final. Before we send to the program to remove the bad emails,...

View Article


Using variables in Select,From,where clauses

I have captured table and column names from INFORMATION_SCHEMA.COLUMNS and .TABLES in a temporary table. I want to search these select columns in their respective tables for a specific int value. I...

View Article

Values to Jobs

Hi, I have a situation where I am executing a package with variables using JOB. I need to dynamically pass the package variable values when I am calling the JOB. Is there any way to do it other than...

View Article

Problem in executing the Activex script on DTS Package

I have a dts package in Sql server 2000 which has three global variables in it. The script run as expected when i run it manually. But when i close the dts package and then run it by right clicking it...

View Article
Browsing all 49 articles
Browse latest View live