473,549 Members | 2,870 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.
5
2,683
thread by: samvb | last post Mar 7 '13 by: Rabbit
Is it possible to prefix A_I field with a number like 301? My initial approach was to check if data exists in table. If no data exists, i would turn on auto increment insertion, insert 3011 then turn off insertion. Would this approach make the operation slow since everytime a row is added, it will do the check, on n off then insert the record? ...
1
1,416
thread by: Fahhad | last post Mar 4 '13 by: Rabbit
I need to pass the @startDate and @endDate as variables to @range in the code given below. But when I execute the below code, I'm getting the Error as follows. What is going wrong in my code, and how can I correct it? Errors: Msg 102, Level 15, State 1, Procedure GetWorkingDays2, Line 4 Incorrect syntax near ')'. Msg 178, Level 15, State...
3
1,434
thread by: Fahhad | last post Dec 9 '13 by: swathee
I need to write an SQL Function (UDF) to find the First Day (int) and the Last Day (int) when I specify a date. For example: When I specify (20130217) (i.e. Feb 17th, 2013), I should be able to find the First Day (01) and the Last Day (28) for the specified month (in this case, Feb). How can I do that? Please provide the necessary code to...
1
4,914
thread by: Fahhad | last post Mar 1 '13 by: Uncle Dickie
I have created a database with two fields "EmpID" (int) and "LeaveDate (DateTime) using SQL Server 2005. How Do I modify the below Stored Procedure to find the total working days for an employee in a specified Month and Year(Eg: August, 2012)? The Total Working Days is as follows; Total Working Days = (Total days in a month) - (...
0
2,293
thread by: bmanning | last post Feb 22 '13 by: bmanning
I have an SSIS package that fails intermittently since 2/18/2013(Monday) mt production Server. The SSIS package accesses excel files on a shared folder. SSIS package has been running successfully for 30 days until this week. SSIS package runs successfully 3 times then fails. Then run again SSIS package runs successful. Below is error: Executed...
3
1,883
thread by: sqlfzk | last post Feb 21 '13 by: Rabbit
my table has a columnn 'name', I want to find only the name are more than 25 characters; I did this, but it doesn't work; can anybody help me with that. thanks; where max(len(ltrim(rtrim(name)))) > 25
3
1,399
thread by: sqlfzk | last post Feb 19 '13 by: NeoPa
Hi, how I can create a column with case when I need another case in "then"; here is my problem: fyi, tyear is 4 diget and year is 2 diget; what I'm doing wrong? = case when isnull(t.status,'') <> 4 then case when rigth(t.,2)< rigth(t.,2) then when t. <= 12 then '20'+t. else '19'+t. end else t. end
19
2,589
thread by: waqar100 | last post Jun 18 '13 by: nbiswas
I have 90 scripts in C:\SQL Scripts\*sql how could i execute by command ,i saw many things on net but could execute it successfully,,, I am using sql 2008 R2 , not a default instance
1
3,371
thread by: ewoj | last post Feb 15 '13 by: NeoPa
I need to create a MS Word document that list all our SQL code for a specific project. I want it to be clear, readable and colorful. Any help would be gratly appreciated.
1
1,739
thread by: lathk | last post Feb 15 '13 by: NeoPa
While installing sql server 2000 standard edition, how to change the default collation.
6
1,740
thread by: MLarsB | last post Feb 13 '13 by: Rabbit
With the dates in the WHERE clause here, 5,100 records are selected. It takes the function below 3 minutes to process them. With the actual date range desired, 119,000 records are selected. Does anyone see a way to make this run significantly faster? SELECT HIST_ROW_ID, HIST_CREATE_DTM, HIST_LOG_ACT_CD, HIST_IMAGE_CD, HIST_TERM_ID, ...
5
2,653
thread by: masoume1 | last post Feb 14 '13 by: Rabbit
I need to export data, from within a Sql SERVER stored procedure to excel. Right now we use access 2003.The procedure has selected from 2 temporary table which joined with other views in our database.This cause problems while i'm trying export data to excel.I had defined another temporary table and insert whole result into it and then select just...
5
1,442
thread by: samvb | last post Feb 11 '13 by: NeoPa
I need to allow users belonging to a specific group in their machine to be able to access a specific DB. I added one group in the server and so the following group was added to the logins in the server: ACCOUNTINGSERVER\INDBUSERS But only administrator, who i made part of the group also access it. But admin's from other systems cant login at...
3
5,943
thread by: Brian Connelly | last post Feb 11 '13 by: deepuv04
I can not figure out why I am getting an error. Can someone help? Here is my code with the line with issue highlighted. SET @var1 = '' SET @var2 = '' SET @var3 = '' SET @var4 = '' SELECT @Counter = MIN(ID) FROM #TEMP WHERE ID>0 WHILE @Counter > 0 BEGIN
12
1,750
thread by: K3nSchr0eder | last post Feb 5 '13 by: NeoPa
Hello everyone! I am new to SQL and have given myself a 3 Day crash course! I apologize for my lack of knowledge. A project was assigned to me for work and so now I need to get it done. I am running SQL SERVER 2008. I have one Database. It is called "HomeHealth". It has 3 Tables. 1.HomeCareAgencies (Holds the Agency Information such as...
2
1,692
thread by: DonaldDD | last post Jan 31 '13 by: ck9663
Is it possible to convert the following script into a view. Ultimately i would like to draw data using excel. The Script goes as follows: DECLARE @columns VARCHAR(2000) SELECT @columns = COALESCE ( @columns + ',',
3
3,290
thread by: samvb | last post Feb 1 '13 by: NeoPa
Am trying to include SQL SERVER 2008 EXpress as a prerequest for my application but having difficulty installing because it got the following error: The specified credentials for the SQL Server service are not valid. To continue, provide a valid account and password for the SQL Server service. The command i am providing it is: /qs...
2
1,701
CabaasSalwe
thread by: CabaasSalwe | last post Jan 30 '13 by: NeoPa
i have Table colled User it cantains Password Field, Normaly in Salect Query for this Table, Will retrive All data Fields in this Table and Password Field all so Displed, My qeustion is How to encrypt Password Field in Fake Data ex(********) durring Select Query! like this.. Id: UserName:Passwod
2
1,391
thread by: uanilkumar | last post Jan 30 '13 by: NeoPa
i have an ms access database nearly 200 dbs with 3 tables in each db. i want to make this ms access database to sql sever 2005 databse i.e i want to get the same tables same data in sql server. can any one help how to write a java program forthis
1
5,794
thread by: Syed Hadi | last post Jan 26 '13 by: NeoPa
what is the use of this sp_addextendedproperty . when we will use and what is function or work of this command.. does it is like a symmetric key .. i search in google i did not get can anybody explain me this
3
1,628
thread by: Syed Hadi | last post Feb 25 '13 by: Syed Hadi
Hi... I got A db in which normal tables are there and also procedures are there the thing is that in the table they didn't mention the references ... and in the procedure they are using references as this is foreign key and primary key... So my ques is how come i should understand from the procedure .... about the references... can any body help...
4
3,279
thread by: nicolasclaudia | last post Jan 30 '13 by: deepuv04
Hi all I need your help, how can you format a string with placeholders with the number of placeholders not known in advance (dynamic number of placeholders) ? I need to do that in T-SQL "xxxxx {0} yyyy {1} zzzz {2} " with {} replaced by parameters. I did the code:
0
2,183
thread by: siburt | last post Jan 20 '13 by: siburt
Trying to setup my laptop as a development base for PHP. Details are as follows: Windows7 x64 SP1, SQL Server 2008 R2, (EasyPHP instalation) PHP 5.4.6, Apache 2.4.2 SQL Server is running fine as can read data using C# (in Visual Studio) PHP is running as can read data from the mysql db that comes with it.
3
1,921
thread by: sohini0910 | last post Jan 19 '13 by: NeoPa
Hi , While I am trying to import a .txt file from Linux server , I am getting this error - "The specified header or row delimeter "{CR}{LF}" is not found after scanning 65536 bytes of the file".. In the linux server I can see the file , open it and can download it to my local windows box as well. what could be the problem ?
1
1,268
thread by: jaidahme | last post Jan 17 '13 by: Anas Mosaad
i have deleted once sql server 2005 from control panel and from all programs also then i reinstaling thq sql server 2005 at that time i m getting error the message shows like"software is installed already" what should i do pls give me details

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.