Hello All,
I have a following table:
Name New Version
P001 New P001 V1
P001 V1 P001 V2
P001 V2 P001 V3
P001 V3 P001 V4
P001 V4
B001 New
If the new name is added to the table then I should be able to add the new Name (B001 New)
If the new version to the name is added then update the...
Hello All,
I have to insert the rows from the #table to the user table. I have written a cursor to implement this process.
The #table has two rows which shoule be inserted in the user table. While inserting records, I have to insert the PK column as well. So I get the max(col) from the table...
Hello All,
There is a column in sql table which contains the data like:
RA-100 R1
RA-200.02.01 ORIGINAL
RA-200.02 R1
GSOP 2709 ORIG
GSOP 2703A ORIGINAL
SOP 112 R 13
SOP 117A R1
There is some uniformity in the data but not a lot. I need to parse the data in three columns as:
(First column -...
Hi All,
I have to create one table and the data stored in the table would be something like this
ID 1 2 3 4 5 6 7 8 9
Step 1 1 1 2 2 3 3 3 3
Role 1 2 3 1 2 1 2 3 4
The ID is always unique. One step can have more multiple Roles.
May I have some suggestions on how to create the table...
Hello All,
I need to delete the data from tables and then insert the data from one server to another server. The FK constraints are defined on most of the tables.
Can anyone tell me how to get the list of tables in the sequence to delete and then insert the data which can avoid the FK...
Hi All,
The collation level on tempdb and the user database is different. So to avoid the collation error issue I changed the code of SP where it creates the #table with the text field to 'default collation' and that resolved the issue.
But some of the SP does not have create #table. They use...
Hi All,
The following queries give the same output. They have written differently.
But performance wise I do not know which one would be better or less expensive. How SQL server treats these two queries differently?
Can anyone tell me which one is more efficient?
declare
@site int...
Hi All,
Can any one tell me what is the command to see the space used by each database and their physical location on the server?
I use the following to list the databases and the space used by them but it does not show the location of their physical files on the server.
exec sp_spaceused...
Hello All,
Can anyone tell me how to add the server using sp_addlinkedserver? I have not done this task before. The server which I need to add is SQL server 2000 and the destination is SQL server 2005.
Thanks in advance,
-techiPA
Hello All,
I installed SQL server 2005 on the machine and restored the databases from 2000. The collation level for the user database (migrated from 2000) is different than the collation level in tempdb at 2005 server.
When I run a SP which creates the temp # table and has join with the user...
Hello All,
I have a VB task on the DTS which uploads the CSV files to the SQL tables. If there are no CSV files I want the VB task to write a errorlog row in the sql table.
Can anyone tell me how to add the logic to insert row in SQL table from VB script task?
Here is the check on the csv...
Hello All,
I import the data from CSV files to the SQL table. The last step (conversion of the data) in the package fails because the last row in the SQL table shows is as follows
I do not know why I get that last line with all these special characters?
12/24/2006 22:30:00 999.99 NULL...
Hello All,
I have to write a update trigger on a table.
The table structure is some what like this
Study
Site (PK,FK)
Study (PK,FK)
VendorID
StudyPro
Site (PK,FK)
Study (PK,FK)
SeqNo (PK)
CustID
Protocol
Materials
CustID (PK)
Protocol (PK)
Material (PK)
The trigger should be on...
Hi All,
I create the temp table in my query. The temp table has a varchar column col1 which stores the data like
-N- NONE
-N- NONE
-N- NONE
*P* NONE
-N- NONE
-N- NONE
*F* NONE
I need to update the col2 (datatype bit) in the same table based on the data in col1.
If Col1 has *F* NONE or *P*...
Hi all,
I get the error when I restore the database from last night's backup.
I use the following cmd:
RESTORE DATABASE ABCRESTORE
FROM DISK = f:\SQLBackups\ABC\ABC_db_200703010508.BAK'
WITH MOVE 'abcdata' TO 'f:\data\abcdata.mdf',
MOVE 'abclog' TO 'f:\data\abclog.ldf'
go
error...
Hi All,
I am very new to VB programming. What I need to know is how do I wriet the VBScript to read the just the CSV files from a directory.
I have to code this in ActiveX script task in DTS. Each CSV fiel from that folder should be imported in SQL table.
Can anyone advice me on how to...
Hi All,
I need to use the DTS to extract the data from CSV file to SQL table. The CSV files are upoloaded to the directory on daliy basis. I need to import the data only from one file where the date in the file name is today's date.
The naming convention of the CSV file is (Daily_02-10-07)...
Hi All,
Can anyone tell me how to separate the string into substrings and store the values in variables
I have a substring called
CPPS.PRIMARY.P01.BAPI RM TEMP
I need the output as follows
@var1 = PRIMARY
@var2 = P01
@var3 = BAPI RM TEMP
Thanks in advance
-techiPA
Hi All,
I have to create the DTS package to
1) Read only the csv files (example of name Daily_11-01-06 ) from directory \\ABC\ABC_D\Reports
2) Parse and import (Room, ReadingType, Date, TimeInterval,Measurement) into SQL database on daily basis
Following is the sample of csv file. This file...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.