473,541 Members | 14,728 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft SQL Server Forum

Microsoft SQL Server database RDBMS - Ask questions about MSSQL administration, queries, errors, xml, data access, transact-sql, tools, mirroring, integration, setup, stored procedures, merging and more.
0
1,486
ddtpmyra
thread by: ddtpmyra | last post Dec 20 '11 by: ddtpmyra
I need help to make this procedure copying file works for me. The error is Msg 50000, Level 16, State 1, Procedure sp_copyfile, Line 23 File copy failed USE GO /****** Object: StoredProcedure . Script Date: 12/20/2011 10:37:44 ******/ SET ANSI_NULLS ON GO
2
1,232
thread by: bkamal | last post Dec 20 '11 by: bkamal
Can anyone provide me the step by step instructions for Converting all the database from SQL server 2000 to SQL server 2005. I have an application that is not been used at all and the whole thing needs to be updated to sql server 2005. Please tell me what all things need to be done including the VB code as well and the database migration.
2
1,938
thread by: nav mac | last post Dec 21 '11 by: nav mac
Hello, how can i send db tables as an xml format to my customer. In ssms there is an icon as 'Results to file' & when i right click on this i checked(checkbox) on XML Editor but my o/p window is empty. how can i acheive this ? can anyone please help me out in this regards. thanks, nav
9
2,152
Palyadav
thread by: Palyadav | last post Dec 22 '11 by: Palyadav
How can i add below 4 field in Existing stored procedure ? DECLARE @StartTime datetime DECLARE @CurrentDate datetime Declare @Days int Declare @Hours int Declare @Minutes int declare @Second int SET @StartTime = EmployeeTempAttendanceDetail.EmpInTime SET @CurrentDate = EmployeeTempAttendanceDetail.EmpOutTime
4
2,127
thread by: kisho | last post Dec 17 '11 by: kisho
i have created on table Customer which have column as primary key and IDENTITY(10000000,1). What i want is how can i insert values for the table using INSERT INTO Customers values(<values>) query Be cause it generates "An explicit value for the identity column in table 'Customer' can only be specified when a column list is used and...
0
1,694
thread by: madankarmukta | last post Dec 15 '11 by: madankarmukta
Hi, This is with regards to the RDLC Subreports. Here is what I tried - on the form load 1) attached the handler with the event subreportprocessing 2) loaded the subreport definition 3) Inside subreportprocessing handler, added a datasource
7
2,262
Palyadav
thread by: Palyadav | last post Dec 16 '11 by: Rabbit
ALTER PROCEDURE . @LeaveApplicationId int, @LeaveId int, @EmployeeId int, @LeaveApprovalFromDate datetime, @LeaveApprovalToDate datetime, @LeaveApprovalHalfDay bit, @LeaveApprovalApplicaitonDate datetime, @LeaveApprovalDuration numeric(18,2), @LeaveApprovalDate datetime,
4
1,542
Palyadav
thread by: Palyadav | last post Dec 14 '11 by: Palyadav
;with cte as ( select empid, cast(datepart(hh, logtime) as varchar(2)) + ':' + right('0' + cast(datepart(mi, logtime) as varchar(2)), 2) as logtime, row_number() over (partition by empid order by logid) as row from #timing ) select c1.empid as EmployeeID, min(c1.logtime) as InTime, max(c2.logtime) as...
1
2,788
thread by: dharol | last post Dec 14 '11 by: ck9663
Total newbie here, many apologies if I have failed to find an extant answer to this question. Using: SQL Server 2000 I need to restore several hundred databases from an external drive to local drive. Would like to batch, eg, call on a text file listing old and new db names/paths and loop through to end of text doc. Currently have...
0
1,140
thread by: lanceonhis | last post Dec 11 '11 by: lanceonhis
We have two systems on developed in .net running off a SQL back end. We have a second data table in DB2 running a whole separate system. I need to dynamically copy data from the ms SQL table to DB2 how can I do it any suggestions?
2
2,151
thread by: jonathan184 | last post Dec 11 '11 by: jonathan184
Hi I am trying to get my query to work in my middleware which piggybacks off of the mssql driver using jdbc. Anyway, The query gets this error when i run in it the middleware ERROR: Failed to create input and/or output schema(s): "Duplicate field name found 'NAME', please modify the query and create unique aliases for duplicate fields"" The...
1
1,655
thread by: Chandak | last post Dec 10 '11 by: Rabbit
Hi Experts, I am running a bulk query to insert data into table from a csv file with the following query : BULK INSERT db_testTable FROM 'S:\path\filename.csv' WITH ( DATAFILETYPE = 'char', FIELDTERMINATOR = ',', ROWTERMINATOR = '\n'
10
1,796
thread by: rajkrishna | last post Dec 12 '11 by: Rabbit
I hope you can help me. I am trying to generate a report using 3 tables - sttakehm, sttakedm and stquem. I wrote below query but it is giving all values of unit_cost, I only need the unit cost which matches stquem.sequence_number=sttakedm.queue_reference and adjustment quantit. The key is sequence number is in one line with Kind = "C"...
1
1,535
thread by: Pacco sekka | last post Dec 8 '11 by: Rabbit
I have create a trigger to insert values into a table from another existing table after an update is made to a 3rd table. But when I run the Update statement to fire the trigger, twice as many rows needed are entered in the new table. Can you please let me know what might be the issue here ?
9
1,681
thread by: nav mac | last post Dec 19 '11 by: Rabbit
I have columns H,I,J,K,L,M in excel and a column M is the sum of (H,I,J,K,L)in excel but if I want to import the excel data to SQL how can I acheive this functionality. Also for each of the columns H through M ,I need the total at the end. eg: H I J K L M t1 t2 t3 t4 t5 (t1+t2+t3+t4+t5) tt1 tt2 ...
1
1,770
thread by: CSJeep | last post Dec 7 '11 by: Rabbit
Hello I have a sql 2008 R2 problem that I’ve tried to accomplishing using dynamic sql but, no luck yet. Create Table Events ( PKID int Not Null, TimeStamp Datetime, EventID int, Eventdata int) Create Table Eventdatalookup(
2
1,836
Adithya Adi
thread by: Adithya Adi | last post Dec 9 '11 by: Adithya Adi
Table name: shift_Login columns:ID, Username, TimeLogin, TimeLogoff Username and password is Checked from another table. 1.ID is AutoNumber, 2.Username is taken from the login form directly(Text Box) 3.TimeLogin is taken (current time) from the button click only one can login at a time. user will logoff after all the process.
5
2,279
thread by: newDevMan | last post Dec 7 '11 by: Rabbit
Ok, So I'm a bit new at SQL Server, and I've researched this everywhere but cannot find a clear answer and/or sample code for a solution: -I have a table that has a bunch of fields including field and a field, and the field, which is the PK. -My goal is to auto-generate the field (PK) from concatenating the and fields. so... =+. ...
2
3,203
thread by: Prashanth Rao | last post Dec 12 '11 by: Prashanth Rao
select stuff((select ','+ from <TableName> for xml path('')),1,1,'')
10
4,866
thread by: Vikki McCormick | last post Dec 5 '11 by: NeoPa
Hi, Having a connectivity issue here. We have a default instance which is not being used (totally inactive and shut down), and a named instance on a SQL Cluster with 2 physical machines, and 2 VMs. This cluster is active / passive. For a very long time everything was working fine. We recently got a call that none of the developers could...
1
1,409
thread by: pallavi manjare | last post Dec 1 '11 by: gpl
how to migrate foxpro database data into sql server 2008 databae
1
1,284
thread by: Yogesh Ful | last post Nov 29 '11 by: ck9663
If we log in through Windows authentication then it is not required password and if we login through SQL server authentication then it is required password. My Question is hot to give password to SQL database so that another person cannot access our database.
1
4,652
thread by: Ma Oo | last post Nov 25 '11 by: Rabbit
I want error log file when I do bulk insert. My sample code is : INSERT INTO tbl_test( USER_ID, CODE, EXCHANGE, UPDATED_DATE) SELECT LTRIM(RTRIM(USER_ID)), LTRIM(RTRIM(CODE)), EXCHANGE = '11', UPDATED_DATE = getdate() FROM OPENROWSET( BULK N'c:\test.txt', FORMATFILE='c:\test.fmt.txt',
6
1,945
thread by: Josh Andrews | last post Nov 28 '11 by: NeoPa
Hi, I have an application that automates the Reference Number (or Ticket Number) for every new record encoded in the database in this pattern/hash: REQ1111-0001 where: 'REQ' is a string (my prefix for request), '11' - current year (4th & 5th char); '11' - current month (6th & 7th char); '-' dash (1 character; 8th place); '0001' -...
5
2,136
thread by: snehasismishra1 | last post Nov 25 '11 by: Rabbit
Hi, I am using below select query. SELECT EmpID,CAST(EmployeeInformation AS xml) as emp, FROM EmployeeTable when there is some problem in EmployeeInformation, then XML parsing is throwing error and select statement is not retriving data after that record. My question is, can i retrive all the record by neglecting bad record?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.