For questions specific to the 2005 version of Microsoft's SQL Server.
1
vote
1answer
5 views
Why decimal round up every decimal result
I have this TSQL script:
declare @dcml decimal
declare @flt float
SELECT @dcml = 5/cast(4 AS float)
PRINT(@dcml) -- return 1
SELECT @flt = 5/cast(4 AS float)
PRINT(@flt) -- return 1.25
Why in ...
0
votes
0answers
9 views
provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server 2005
I have deployed one vb.net desktop application and sql server is used for backend. It is properly working on local machine but when accessing database from remote machine it giving the error in the ...
0
votes
0answers
21 views
Stored procedure not working with .ASMX file
Anyone know why the following is not working:
[WebMethod()]
public double GetDayCount(string strMeetingDate, string strMeetingTime)
{
string[] strStartDateParts = strMeetingDate.Split('-');
...
0
votes
2answers
23 views
How to add and subtract hours in SQL Server 2005?
I want to add 24 format hours then result would be either 24 format or 12 format hours as per my requirement I will use two functions
This is my example
add ('08:05'+'02:00') result is 10:05
now ...
-2
votes
1answer
25 views
Symbols not supported using varchar in SQL Server 2005 [closed]
I was assigned to do a task.... I have a page with some text boxes and a save button, when I enter values to the textboxes and click save button data will be saved to the databases.
In SQL Server the ...
-2
votes
2answers
26 views
select records custom no of times in sql server 2005 [closed]
SQL database table have records like data1, data2 and data3.
and perform select operation must be give the output of
data1
data1
data1
data1
data1
data1
data2
data2
data2
data3
data3
1
vote
2answers
46 views
write a query to fill the above table from 1 Jan, 2008 to 31 Dec 2014
Create a table with the following columns
DateId, Date, Day_Name, Day_of_Week, Day_of_Month, Day_of_Year,
Mon… _Name, Quarter_of_Year, Year_Name,Year
write a query to fill the above table from 1 ...
1
vote
1answer
45 views
C# and SQL Server 2005
I have 4 tables from which I am fetching records. The first three tables required inner join with the common rows but with 4th table I need left outer join because I have to preserve the already ...
2
votes
1answer
28 views
SQL Server wiped my table after (incorrectly) creating a new column .. what the heck happened?
I added a new column to an existing table in the SQL Server Management Studio table designer. Type INT, not null. Didn't set a default value.
I generated a change script and ran it, it errored out ...
1
vote
1answer
18 views
SQL update by inner join
Say I have two tables and would like to update the records in t1 only for those records that exist in t2.
ID = int, all others varchar
t1
id<PK>,sample,variable,status,notes
t2
...
2
votes
3answers
41 views
SQL Server 2005 Difference in Values
I have this query:
SELECT ID, Value
FROM Table
WHERE ID = (SELECT MIN(ID) FROM Table WHERE RecID = 12637)
UNION
SELECT ID, Value
FROM Table
WHERE ID = (SELECT MAX(ID) FROM Table WHERE RecID = ...
-1
votes
0answers
17 views
SSIS flat file connection format [closed]
I have a flat file SQL Server Integration Services job that saves as a text, but the output file format is all over the place. How do I fix it?
Can I execute a SQL task to save into a table and ...
0
votes
2answers
44 views
Converting query to a stored procedure
I have the following query which works as is (people will probably cringe, but try to ignore how bad it is):
DECLARE @submit_day DATETIME;
DECLARE @meeting_day DATETIME;
DECLARE ...
-1
votes
0answers
12 views
when i use sql server 2005 remotly i got error [closed]
i build a software front end tool c#.net for tracking some data in my office and install sql server2005 in my server it work smoothly through LAN every one fetch data from server easily which are ...
0
votes
0answers
29 views
SQL Server Replication Conflicts
I am doing merge replication and everything has been running fine for 4 months now. But am not happy with seeing few conflicts even after looking at the conflicts viewer, it is always resolve itself. ...