|
Yes, the current date. In Oracle, it's "SYSDATE()" plus some other synonyms. I don't use SQL Server, and don't know what it wants.
Since you didn't give examples, I am not sure the query I provided will give what you want, but from your description, i *THINK* it's what you want. Let me know how it turns out.
David
|
|
|
|
|
yes, it works.
its GETDATE() for sql server.
Thanks Alot!
|
|
|
|
|
Good morning guys,
i'm using sql pervasive 9.0 for accpac. I have a password on one of my databases, so that i can't get in. I would like to remove it(i mean reset the old password) and set a new one.
Someboby please can help me find any solution about this?
Regards.
|
|
|
|
|
Did you check with the Customer Support?
Clickety[^]
|
|
|
|
|
not yet! thanks for your advice. try it today.
|
|
|
|
|
Hi all
I need to get some information on how cobol handles database? and how can we access the MS SQL Database from ACUCOBOL?
I would really appreciate if any body can forward links on this topic,
Bhagirathi
|
|
|
|
|
|
Hi colin
Thanks fr your time , i did go thru some sites, actually i don't know cobol at all and i am looking for code logic to access sql databse from cobol and how different it is from access any dbms
i am not able to spot any good code refernce i have checked out
cobug-cobol users group and some other sites, i need a basic idea that is all
Regards
Bhagirathi
|
|
|
|
|
Since SQL Server is a relational database I would imagine that the way you access it is fairly similar to any othe relational database system.
Of course, COBOL has such a long legacy that it has connected to all manner of weird and wonderful databases in its time.
|
|
|
|
|
What the advantages of having lots of subquery....?
|
|
|
|
|
Plenty of time to drink tea while you wait for the query to run.
|
|
|
|
|
Having lots of subquerys will slow down your query. The more a query does the longer it will take, which makes sence right?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
|
basically there is no advantages of having sub queries...
|
|
|
|
|
I have made an SQL Server 2005 instance (SERVER2005) be a linked server in an MSDE 2000 instance (MSDE2000). Everything is fine with the setup and I can run queries on tables in a database in Server 2005 instance from the MSDE 2000 instance as follows:
SELECT * FROM [SERVER2005].[ContactsDB].[dbo].[Contacts]
This is how I added the linked server to MSDE2000 instance:
USE master;
GO
EXEC sp_addlinkedserver 'SERVER2005', N'SQL Server'
GO
The problem is that if I execute a stored procedure as follows:
DECLARE @ContactID INT
DECLARE @ContactName NVARCHAR(36)
SET @ContactID = 1
EXEC [SERVER2005].[ContactsDB].[dbo].[dalsp_GetContactName] @ContactID, @ContactName OUTPUT
the execution of the stored procedure is not error-free and the following error message accompanies the results: 'A severe error occurred on the current command. The results, if any, should be discarded.'
If I link two SQL Server 2005 instances the execution is smooth. What can the problem be? Is it the provider? Why does executing a SELECT statement not bring and error yet executing a stored procedure bring an error?
|
|
|
|
|
Did some research myself and found the cause. Thought I should share it with you.
In the event that you add an SQL Server 2005 instance as a linked server to an MSDE 2000 instance, any stored procedure in SQL Server 2005 instance you choose to execute from the MSDE 2000 instance should not have a PRINT statement.
This applies to even stored procedures called by the stored procedure you are calling directly.
If you have statements like:
PRINT N’Hello’
, then error, "A severe error occurred on the current command. The results, if any, should be discarded" will be returned.
Have a nice day.
|
|
|
|
|
I have got three tables...Departments, Branch, and Employees
my table branch is having empid field only..but i have to get empname from employees table
I wanna write a stored procedure to get brid, branchname and empname..?
Branch table and Employees table have empid as common field...!!
Please anyone help me in writing a sql query to overcome this....
Thanks in advance
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
|
hi hope this works on
select b.id,b.branchname,e.empname
from branch b inner join employees e on b.empid=e.id
the above query gives to the branchid,branchname and empname where empid is matching with branch table empid.
get back for any queries.
|
|
|
|
|
I have a application based on an access database. I want to be able to distribute the data in the database on one unit and drop it into another unit installed on another machine. I figured i could export the database to xml and then import the file on the other machine? If this is what to do how do i do it? Any other ideas appreciated
mike
|
|
|
|
|
Hi, I'm programming an application using a typed DataSet and a Sql database. I was wondering if there was a way of programmatically creating a database on the server based on the DataSet.
What I want to do is during the software installation, the user enters the connection parameters of their Sql server and then the installation program automatically creates the schema/database the software needs on their database server. I thought the simplest way would be to create it from the DataSet. Is there any better way?
Thnaks a lot!
|
|
|
|
|
You can't do it from a DataSet. The only way you can do this is one of two ways.
One, execute an SQL Script to create the database, setup tables and permissions, and any custom functions, stored procedures, initial data, ...
Two, execute the same script commands from a custom action in your installer.
|
|
|
|
|
in the database i want to store images for each employee ,to do this in sqk server 2005 there is a data type called image which is defined under binary ,How ever i want to know the way to store an image in the data base and retreive it from the data base ...
|
|
|
|
|
Convert the images to bytes and send the bytes to your database!
Steps
Create a stream object
Assign your image to the stream
Copy the contents of the stream to byte array
Send the byte array to the database
gauthee
|
|
|
|
|
thank you for your kind reply ,could you please explian it bit more , i'm using c# and do i have to do this from the application or when inserting valued into the table in sql server .
|
|
|
|