How can i implement Excel COMBIN function in SQL 2005, either in a store procedure or in a function. About COMBIN function in Excel follow this Link.
Thanks.
I am getting the above error in my VS 2008 C# method when I try to invoke the SQL getColumnNames stored procedure from VS. This SP accepts one input parameter, the table name, and works successfully from SSMS. Currently I am selecting the AdventureWorks AddressType table for it to pull the column names from this table. I can see teh…
Is there some standard way to name indexes for SQL Server? It seems that the primary key index is named PK_ and non-clustered indexes typically start with IX_. Are there any naming conventions beyond that for unique indexes?
I have Table with two smalldatetime columns, where one is startTime and other one is endTime.
I need to select all values from table which between times of both columns compared to getdate()' time.
I'm using SQL-Server 2005.
example
startDate endDate value1
2/2/01 16:00 2/2/01 18:00 1
2/2/01 21:00 2/2/01 22:00 2
2/2/01…
Can anyone recommend a tutorial on how to write a Java Servlet which connects to MS SQL server and manages data?
I'm trying to write something which pulls products out of one database and inserts them into a stored procedure located on another database.
Thanks in advance.
When using arabic language, data is stored in database with ? (question mark) sign instead of real arabic characters in SQL server. Suggest me solution if anybody have idea.
I have been trying to fix this solution for the last day. I'm trying to add NETWORK SERVICE as a user to the SQL Server Express installation on the server. Everytime I get the error 'User does not have permission to perform this action.'. Any ideas?
Hi,
I have an app and I have come to a point where I need to build a
sql statement up dynamically.
Is there a way to execute it and return a type that has not been defined
via the designer with Linq2Sql??
Malcolm
Any updates in SQL 2008 to allow a variable for the IN of a where clause?
Declare @InParams varchar(100)
Set @InParams = '1,2'
Select * from Category
Where CategoryID in @InParams
This code was once working on sql server 2005. Now isolated in a visual basic 6 sub routine using ADODB to connect to a sql server 2008 database it throws an error saying:
"Login failed for user 'admin' "
I have since verified the connection string does work if i replace the body of this sub with the alternative code below this…
I get the following error when I call a stored proc within an execute sql task in SSIS.
"Description: Executing the query "Exec up_CallXXX" failed with the following error: "Incorrect syntax near '13'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or…
When using a SQL join, is it possible to keep only rows that have a single row for the left table?
For example:
select * from A, B where A.id = B.a_id;
a1 b1
a2 b1
a2 b2
In this case, I want to remove all except the first row, where a single row from A matched exactly 1 row from B.
I'm using MySQL.
Is there a tool or code to convert a sql statement to class?
Something like:
Dim sqlText = "SELECT CustomerID, Name, Address, City FROM dbo.Customer WHERE CustomerID = 1"
Dim obj As New ***SqlStatementTool***(sqlText)
obj.GetTables() 'Will Return Tables in sqlText
obj.GetWheres() 'Will Return conditions in sqltext…
I have 3 computers having the same sql server 2005 database, i would like to gather the data from the 3 computers to another computer which has the same database.
pls help me tnx in advance
I need help converting this SQL statement, into EF4:
Select Posts.PostID, Post, Comment
from Posts left join
Comments on posts.PostID = Comments.PostID
Where CommentID not in
(
Select PostID
from Votes
where VoteTypeID = 4 --4 = flagged comment type
)
In my database, the Votes table…
I am using the below statement to generate age of a person in Oracle SQL and my question is below.
SELECT TO_NUMBER(TO_CHAR(CURRENT_DATE,'YYYY'))-TO_NUMBER(TO_CHAR(BIRTH_DATE,'YYYY')) FROM NAME WHERE NAME_ID =NAME_ID
This statement is only correct upto so far that I need a statement which could count months and…
I am getting the below error when executing my application on a Windows XP machine with .NET 2.0 installed. On my computer Windows 7 .NET 2.0 - 3.5 I am not having any issues. The target SQL server version is 2005. This error started occurring when I added the datetime to the stored procedure. I have been reading…
I'm building a windows mobile app. And using SqlCe.
I'm looking for a good sql query builder. So instead of writing "SELECT COLUMNS FROM TABLE WHERE etc...
Is there a good free library that can build this sort of query?
I need to convert a number which gives decimals in factored format in to decimals,
i.e. 11.16 is 11.5 in decimal. This is because 16 is in base of 32 and 11.16 should be read as 11+16/32 = 11.5
I get 11.16 as a string and I need to change it to 11.5 as numeric in MS SQL(2005) database.
Any shorter way of doing…
hi,
i would like to compare numeric data in rows. for eg, i have a table that has a column as such:-
Number
======
1.88
9.99
8.76
9.88
I want to compare 2nd value, 3rd value, 4th value to the 1st value. And then 3rd, 4th value to the 2nd. then 4th to 3rd.
How can i construct an sql to do this?
Since @A is never declared, sql server should throw an error, but it doesn’t. Why is that?
DECLARE @i int = 1;
IF @i > 10
BEGIN
DECLARE @A int = 100;
END
PRINT @A; // doesn't return any result
thanx
I have been playing around with creation of pdf documents for a project that I'm working on. I would like to store the generated pdf document in a SQL database and then later be able to retrieve this pdf as well.
What are some suggestions for doing this? Can the document be stored in the database without…
I'm trying to execute this on MS-SQL but returns me an error just at the Group by line
update #temp
Set Dos=Count(1)
From Temp_Table2010 s
where Id=s.Total and s.total in (Select Id from #temp)
group by s.Total
Do anyone knows how can I solve this problem having good performance.
Hi I need some sample SQL Server Employee database with data such as id, surname, name, age, adress etc. It must be quite big, I search with google, but I don't find any good sample.
Can any body help ?