Urgent : .sql File Problem With Variables

Jan 5, 2001

HELP!!!! ARGHHH!!!!!

I can't get this to return the rows, I keep getting 0 rows...

declare @mytime datetime
declare @num_rec integer

set @mytime = getdate()

set @num_rec = (select count(*) from mytable where enter_time <= @mytime)

I've tried '@mytime' also.

No success. Please help


Thanks,
Brian

View 1 Replies


ADVERTISEMENT

URGENT HELP!!! To Print Variables More Than 255 Chars (SQL Server 6.5)

Oct 23, 1999

Is there any way to print variables more than 255 from ISQL on DOS


eg:-

DECALRE @Var1 (255)
DECALRE @Var2 (255)

SELECT @Var1 = 'a long line of 255 chars' -- a long line of 255 chars
SELECT @Var2 = 'a long line of 255 chars' -- a long line of 255 chars

-- I wish to print

PRINT @Var1+@Var2 -- that is 510 chars

-- (i dont wish to use SELECT @Var1+@Var2)


any body???

thanks in advance

domini

View 2 Replies View Related

How To Set A File For Replacement Of Variables?

Aug 30, 2007

Hi everyone,

I'd like to change in order to improve the maintenance of our packages.
I've got lots of packages running with values such as "path" and "filename" inside variables.

Let me know how can I set xml file for that.

Thanks a lot,

View 1 Replies View Related

Passing Variables To BATCH FILE

Aug 4, 1998

Similar to a previous thread, but not exactly. I have a batch file that takes
two date parameters. I have a SQL script that gets the values I want and assigns
them to variables, but I don`t know how to pass these to the batch.

I`m thinking of something like:

declare @myvar1 datetime, @myvar2 datetime

select @myvar1 = <some date value>
select @myvar2 = <some date value>

exec xp_cmdshell "c:mssqlscriptsMYBATCH.BAT" @myvar1 @myvar2

This just errors out when it reaches the variables in the last line. If I move
the variables inside the quotes, it passes them as literal text strings, not as
the assigned datetime values.

Any ideas? Is this possible?

Thanks,
Robert

View 3 Replies View Related

File Task Moving With Variables...

Apr 25, 2007

I have a 'file system task' moving files from one server to another for processing. I have defined the path and filename as separate variables. When I attempt to pass them together into the task I receive an error.



Source Path & Filename:

@[User:: DataSourceFolder]+"\"+ @[User::CD_PaidClaimSource]

Outputs:

\umrdwh2FTPCLAIMDAILY.DATA



Destination Path Now: (Filename not specified per another thread.)

@[User::WorkingFolder]



Original Destination Path: (Which did not work.)

@[User::WorkingFolder]+"\"+ @[User::CD_PaidClaimSource]



I receive validation errors:

Error 1 Validation error. CLAIMDAILY Move : Failed to lock variable "\umrdwh2FTPCLAIMDAILY.DATA" for read access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.". ClaimLoading_MASTER.dtsx 0 0





How do I overcome this without hard coding the path in the task?












View 11 Replies View Related

Raw File Destination And Environment Variables

Feb 27, 2006



when using a raw file destination it would be nice to be able to use an environment variable for the filename property.

like

%my_extract%data.txt

instead of

c:my_extractdata.txt

View 23 Replies View Related

Raw File Source: Why Do I Seee System Variables?

Oct 5, 2007



[Microsoft follow-up]

In the Raw File Source component when I set AccessMode='File name from variable' and select the drop down for 'FileNameVariable' property the first thing I see is all the system variables. What's the point in displaying those? They are completely useless in this context. Would it really have been that hard to remove them?

Can this be changed please?

-Jamie

View 3 Replies View Related

Read Of Flat File, Some Data On 1st Row Should Be Stored In Variables

Apr 7, 2008

I'm reading a Flat File.
The 1ste record containts special Info that is needed for first preparing the database on a buld insert of the remaining lines.

How could i realize this, just read 1 line, store some of that data into variables, execute some proc's and then read the rest of the file ?

Kind Regards.

View 4 Replies View Related

Storage Location For A Configuration File For Global Variables In DTS

Nov 15, 2007

Hello,

We have an existing OLD System in SQL Server 2000 DTS Packages.
The Whole application runs on DTS.
There are several Packages which are called from a Master Package. Each Child packages have their own Global Variables. Most of them are the File Location variables to have the Source Location of the Input Data, mainly from the Excel Files.
Now, even if the Global Variables are there to change whenever they want to change the Locations of the Files, they have to goto each child package and change the variable themselves.
To resolve this issue, they want a configuration File (INI) / Table which would store those Variables. My thought is to read from that File/Table and Update all the packages' global variables through an ActiveX Script as the First Step of the Master package. That would eliminate the need of changing anything in the existing System.
But the Problem is the management (PM / DBAs / Team members) have different views to store the Configuration data.
1. Some wants it into a Different Database, having one table for this application so in future they can also add another table for some other application.
2. Some wants to store it in a Table in the Same Database of this Application.
3. Some wants to save it as a INI file.

As i'm the one who's going to really implement it, they have asked me to research for a best solution out there.

so I request to help me to decide which is a good solution and why.

Best Regards,
Deepak

View 4 Replies View Related

BCP Task And Dynamic Import And Export Of A File Via Package Variables

Jul 3, 2006

I have a requirement to create many SSIS packages and no datatransform is required so the BCP task looks a good contender providing it can do both import & export

is it possible to parse the values in bold as package variables into the BCP task. If so how?

BULK INSERT ipcs_wvg.dbo.extract
FROM 'D:IPCSextract.csv'
WITH (FORMATFILE = 'D:ipcsqueryextract.xml');

Thanks in advance

Dave

I have a global database called ETL Configuration for all my SSIS packages that uses a single table. So I can create three global variables

USE [ETLConfiguration]
CREATE TABLE [dbo].[SSIS Configurations](
[ConfigurationFilter] [nvarchar](255) COLLATE Latin1_General_CI_AS NOT NULL,
[ConfiguredValue] [nvarchar](255) COLLATE Latin1_General_CI_AS NULL,
[PackagePath] [nvarchar](255) COLLATE Latin1_General_CI_AS NOT NULL,
[ConfiguredValueType] [nvarchar](20) COLLATE Latin1_General_CI_AS NOT NULL
) ON [PRIMARY]

Here is the data I would put in here

ConfigurationFilter = 'MySSISPackageName'

ConfiguredValue = 'D:IPCSextract.csv'

PackagePath = 'Package.Variables[User::gsFileName].Properties[Value]'

ConfiguredValueType = 'String'



ConfigurationFilter = 'MySSISPackageName'

ConfiguredValue = 'D:ipcsqueryextract.xml'

PackagePath = 'Package.Variables[User::gsFormatFile].Properties[Value]'

ConfiguredValueType = 'String'

ConfigurationFilter = 'MySSISPackageName'

ConfiguredValue = 'ipcs_wvg.dbo.extract'

PackagePath = 'Package.Variables[User::gsTableName].Properties[Value]'

ConfiguredValueType = 'String'



--Database connection info

ConfigurationFilter = 'MySSISPackageName'

ConfiguredValue = '.mssql2005'

PackagePath = 'Package.Connections[MyDatabaseName].Properties[ServerName]'

ConfiguredValueType = 'String'



ConfigurationFilter = 'MySSISPackageName'

ConfiguredValue = 'MyDatabaseName'

PackagePath = 'Package.Connections[MyDatabaseName].Properties[InitialCatalog]'

ConfiguredValueType = 'String'



I have looked at lots of options to automaticly create SSIS packages and have a hunch that that simple can be better: All these solutions look way to complex to what I want to achieve--

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=17484&SiteID=1

http://lakshmik.blogspot.com/2005/05/how-to-programmatically-create-ssis.html

Create DataFlow Package Sample
http://msdn2.microsoft.com/en-us/library/ms161541.aspx

SMOTableList Sample
http://msdn2.microsoft.com/en-us/library/ms161564.aspx

View 4 Replies View Related

Integration Services :: DTSConfig File Being Used When Try To Edit To Change Some Variables

Jul 20, 2015

I've deployed my ssis pkg to the server and created a sql job to run this pkg. So far, everything is fine. Today, I got a request to change some variables inside the package which is part of the .dtsconfig.  I want to edit the deployed .dtsConfig but it won't allow me and always complained  that this file has been opened by another program. I am sure i've closed my ssis designer and other notpad, why can't I edit and save .dtsconfig file?

View 4 Replies View Related

Log File - Urgent

Aug 11, 2000

Sorry, my question is on SQL Server 6.5

My transaction log is full.
I pushed the Truncate Log button, didn't do anything
I backed up the database (full backup), didn't help
I expanded the Log size from 300MB to 350MB and my 50MB became unavailable in a few seconds.
There is not much current activity out there.

Do you have any ideas how can I fix it?

View 4 Replies View Related

Problem On Log File &#34;urgent&#34;

Mar 13, 2002

How can I change The model of recuperation from Recovery Full to Simple or to Bulk_logged.
Please,which command can I use on Transact SQL.

Thanks in advance
kinds regards
Abdel

View 1 Replies View Related

Log File SIze (Urgent)

May 19, 2000

My Database Log file Size Increased dramatically upto 5GB. My Data file size
is only around 600MB. Almost my Harddisk space occupied fully by log file. How I reduce the log file size. Anyone can give me some tips?.

View 2 Replies View Related

After Bcp Missing Txt File--urgent

May 24, 2000

Hi,
I run the following command , it went well but i didnt find
a file authors.txt
where will i find this authors.txt
exec master.. xp_cmdshell "bcp pubs..authors out authors.txt -c
-Sserver -Uuser -Ppwd"

--kavira

View 3 Replies View Related

Creating File (urgent)

Mar 30, 2004

hi,
I am trying to create a file using a query in SQL...
kindly help.
Thankyou. --- Vijay

View 8 Replies View Related

Sql Text File Growing !very Urgent!

Jun 28, 2000

there is a sql.txt file in my c: which grows very fast when i start sqlagent...it keeps occupying the free space in the drive..can anyone please help?

View 4 Replies View Related

Restoring The Backup File - URGENT PLEASE

Nov 28, 2000

Hi Everybody,

Our branch office in Europe has sent full 'backup' file of capacity 25GB.
I have to restore this backup to our database. Their database is 'Candidate'
and our database is 'client'. Both these databases have different logical
names and physical names.

The following Batch script only I hv executed,

RESTORE DATABASE Client
FROM DISK = 'd:dumppaw01dump.bak'
WITH MOVE 'candidatedata' TO 'e:mssqldataclient_data.mdf',
MOVE 'candidatelog' TO 'd:mssqllogclient_log.ldf',
REPLACE

Can anybody tell me, what I have executed above is correct or not. Now
restoration is going on for more than an hr. Still it is going on. Is there
any other way to restore this backup set very fastly.

Our server has got very good hardware setup. Good amount of hard disk space.
4GB RAM Memory. Running 4 processors. No other service is running apart from
SQL Server. Right now nobody is accessing the server.

How long it will take to restore this backupset?. This is urgent please.

Any help would be appreciated.

tks in advance,
Sri

View 2 Replies View Related

Primaryt File Group-Urgent

Feb 22, 2001

I am to create a new file group?Should it be on Primary file group?What is the advantage of having it on Primary File Group?
Thanks
Jai

View 1 Replies View Related

DTS File Xfer Question (urgent)

Feb 13, 2002

Hi,


We have to copy data from files from Novell system to Sql sever 2000. I use DTS for that. The problem is that Novell system files(the way they are extracted) has end of file character. Because of this the DTS package fails. But if we open the file, get rid of the end of file character (looks like square in wordpad), the package runs fine.
Is there any way to make DTS identify this character as end of file and ignore it? We have hundreds of files to move on regular basis and some of the files are large (> 10 MB) so that we cannot open it or see it.

Any suggestion will be appreciated.

View 1 Replies View Related

Urgent: File Management With SQL Server

Oct 22, 2004

Hi all,
I want to manage tehnical documents (.dwg, .dxf, .doc, xls, .pdf, ...) with SQL Server. I can use the image data type of DBMS but when the many users store their files in database so it network speed is slow.

Can you show me the way to store and open these files in hard disk of server, and filename path of it on server is stored in table of database.

Thanks

Bear

View 5 Replies View Related

(URgent)Problem With Excel File

Sep 17, 2007



Hi,

I am trying to import data from a spread sheet to a sql server database... and one of the cells contains which are numeric and only and some are alpha numeric also... but when i try to import them to Sql server i get a NULL in the cells where there is Alpha numeric characters...

I have also tried opening a new spread sheet and setting the format for that particular column and text then i just paste it and then saving,.. but when i try to upload the data i am getting an error (thru my asp.net website) Saying that

No value given for one or more required parameters.

Hope someone can help me solve this.....

Regards
Karen

View 4 Replies View Related

Need To Move 20GB File On Web - Urgent

Dec 20, 2007

hi All,

I have a file of 20 GB and need to move this file from my location to machine on client network.

FTP does not work and crash.

IS there a way to move the file??????

it is important....reply.

View 4 Replies View Related

Execute DTS 2000 Package Task Editor (Inner Variables Vs Outer Variables)

Sep 4, 2006

Hi,

I am not comfortable with DTS 2000 but I need to execute a encapsulated DTS 2000 package from a SSIS package. The real problem is when I need to pass SSIS variables to DTS 2000 package. The DTS 2000 package have 3 global variables that I can identify on " Execute DTS 2000 Package Task Editor - Inner Variables ". I believe the SSIS variables must be mapped on " Execute DTS 2000 Package Task Editor - OuterVariables ". How can I associate the SSIS variables(OuterVariables ) to "Inner Variables"? How can I do it? Much Thanks.

João





View 8 Replies View Related

How To Pass XML File To Stored Procedure (Urgent)

Dec 18, 2007

i am trying to pass a large XML file from VS2005 (web service layer) to stored procedure (SQL Server 2000)In my stored procedure, the input parameter takes as "nText" (which will be XML file)Question:While performing ExecuteNonQuery, i am getting request timeout i think this is coz of large XML file i am passing.can anyone plz tell me how to pass XML file to SP...it would be better if you can provide me with some codei am completely new to this XML file passing between web service and SP...... thanks a lot in advance..... 

View 7 Replies View Related

Storing Query Output As File (urgent)

Dec 27, 2000

hi all...
i want to store the output of an sql query as a text file.this is for my project i am doing in java.can u help me how to do this..it is very urgent

thanking u

View 2 Replies View Related

File Group Free Space--urgent

May 23, 2000

Hi,
In sql 7.0 , i would like to create a database with the size of 10Gb, in my server couple of databases already exist.
How do i know how much free space is there in File group.
we are having only one file group i.e PRIMARY.
Could anyone pls tell me about this.
Thank u.

--kavira

View 2 Replies View Related

Text File Import Into One Record Very Urgent

Nov 15, 2000

Hi Every one.

I have a text file (BEA.Txt) which contains the description of the products. I have the product table as below

Product_Code VarChar(3)
Description Text

I need to add the text from text file BEA.TXT into product table for Product_code = BEA.

Please help me
Thanks
Lilly

View 3 Replies View Related

TO ALL SQL Gurus TEXT FILE IMPORT VERY VERY URGENT

Nov 16, 2000

Hi Every one.

I have a text file (BEA.Txt) which contains the description of the products. I have the product table as below

Product_Code VarChar(3)
Description Text

I need to add the text from text file BEA.TXT into product table for Product_code = BEA.

DTS DOS NOT WORK !!!. IT ADDS SEVERAL RECORDS TO PRODUCT TABLE. IT CONSIDERS EACH CARRIAGE RETURN AS NEW RECORD IT DOES NOT HELP MEARLY

Please help me
Thanks
Lilly

View 8 Replies View Related

Flat File Output From SQLServer 7.0 -URGENT

Dec 8, 2000

Other than using the -o parameter of ISQL, is there any way to mimic the DBMS_OUTPUT.PUT_FILE capability that exists in ORACLE (also set serveroutput xxx). I have a big need to run both queries and stored procedures and have the output placed in a flat file. This flat file will then be edited and loaded into another SQLServer 7.0 table. Basically,
SP or SQL stmt -> output to flat file -> external manipulation -> SQL table
Thanks in advance.

View 2 Replies View Related

Urgent - Unable To Restore/attach A MDF File

Jul 7, 2004

Hi,

I was having problems on myt PC so i did a fresh installation. However I had backed up my SQL database (I only have the MDF file and not the log file).

I have tried restoring and attaching options but nothing works :(

I also get the error saying

"Can not open backup device.... Device error or device off-line. See the SQL server error log for more details. RESTORE database is terminating abnormally".

Please this is urgent. WIll be VERY grateful for your urgent reply.

View 7 Replies View Related

Urgent - Unable To Restore/attach A MDF File

Jul 7, 2004

Hi,

I was having problems on myt PC so i did a fresh installation. However I had backed up my SQL database (I only have the MDF file and not the log file).

I have tried restoring and attaching options but nothing works :(

I also get the error saying

"Can not open backup device.... Device error or device off-line. See the SQL server error log for more details. RESTORE database is terminating abnormally".

Please this is really urgent. Will be VERY grateful for your urgent reply.

View 13 Replies View Related

(Urgent)Question About Importing A Excel File

Oct 4, 2007



I have a excel file which contains 4 columns and have the same number of columns in my SQL server database...

i want to add a column in sql server which is Rownumber and it has int indentity...

But when i insert the data in to the sql server database this is error i am getting in my.net program

Received an invalid column length from the bcp client for colid 1.

any help will be appreciated.

Regards
Karen

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved