Search Results

Showing results 1 to 23 of 23
Search took 0.01 seconds.
Search: Posts Made By: darkagn ; Forum: MS SQL and child forums
Forum: MS SQL 20 Days Ago
Replies: 3
Views: 483
Posted By darkagn
Hi shariqmsit and welcome to DaniWeb :)

"hospital administration database" is pretty abstract. I think you need to define what is required a bit more than that before you even think about database...
Forum: MS SQL 31 Days Ago
Replies: 2
Views: 585
Posted By darkagn
Use the SUBSTRING function.

SELECT SUBSTRING(ImageLink, 2, 100) FROM TheTable -- the 2 indicates start at index of 2, the 100 will give you the next 100 characters in the string "ImageLink"
Forum: MS SQL Apr 14th, 2009
Replies: 3
Views: 410
Posted By darkagn
Hi Somerston and welcome to DaniWeb :)

You will need to join to the employee table twice to get the name for each column. Something like this should work:

-- first select the columns required...
Forum: MS SQL Apr 7th, 2009
Replies: 1
Views: 520
Posted By darkagn
I'm not sure what you are trying to achieve by running the trigger as another user. I think this would cause you more headaches than it would solve.

"I'm not very confortable with that since I...
Forum: MS SQL Mar 26th, 2009
Replies: 2
Views: 446
Posted By darkagn
Hi debeginin and welcome to DaniWeb :)

I'm pretty sure MS SQL Server 2000 is a stand-alone install. I know later versions require the .NET Framework, but from memory you should be able to just...
Forum: MS SQL Mar 23rd, 2009
Replies: 8
Views: 1,374
Posted By darkagn
Hi zammari10 and welcome to DaniWeb :)

Your issue is a different one to this thread. I suggest you start a new topic so that more people will read your question and hopefully someone will have an...
Forum: MS SQL Mar 21st, 2009
Replies: 8
Views: 1,374
Posted By darkagn
Ah ok, sorry I misunderstood your intent. So in order to loop through each product, I would use a CURSOR. Basically a cursor provides a way to loop through objects in a table. Here's a simple...
Forum: MS SQL Mar 20th, 2009
Replies: 8
Views: 1,374
Posted By darkagn
Hi alexstrong29 and welcome to DaniWeb :)

If the recommended products are also in the products table, what I would do is add four columns to your product table that represent the product ID's of...
Forum: MS SQL Mar 18th, 2009
Replies: 7
Views: 4,744
Posted By darkagn
What is the type for the field 'creationdate'? Is it a date, datetime, smalldatetime or something else?
Forum: MS SQL Mar 16th, 2009
Replies: 3
Views: 3,160
Posted By darkagn
The DATEADD function will do what you need. Its syntax is DATEADD(datepart,number,date) where the datepart parameter is the interval that you are adding (eg second which can be abbreviated to ss),...
Forum: MS SQL Mar 15th, 2009
Replies: 7
Views: 4,744
Posted By darkagn
Hi again,
The easiest way to avoid duplicates is to limit the select statement according to some criteria. Do you have an ID field in the table that you can use, or some sort of date field to...
Forum: MS SQL Mar 13th, 2009
Replies: 7
Views: 4,744
Posted By darkagn
Hi Lido98 and welcome to DaniWeb :)

This can be done in SQL Management Studio in a few easy steps:


First of all, you need to connect to Server B.
Once connected, you need to link Server A...
Forum: MS SQL Mar 10th, 2009
Replies: 2
Views: 473
Posted By darkagn
You can copy the data from one database to another, but the method depends on whether or not they are located on the same MSSQL Server instance. If they are, then you can qualify the database name...
Forum: MS SQL Dec 13th, 2008
Replies: 1
Views: 564
Posted By darkagn
I'm sorry Aamit, but I am not sure what you are trying to achieve here. Do you want to add a column, change_id, to your table and have the existing rows have an auto-incrementing number assigned to...
Forum: MS SQL Dec 13th, 2008
Replies: 1
Views: 1,137
Posted By darkagn
Something like this should work:

-- set where to insert
INSERT INTO Table_one (First_Name)
-- select values to insert
SELECT Name FROM Table_Two
-- you may need to specify which ones from...
Forum: MS SQL Dec 10th, 2008
Replies: 1
Views: 548
Posted By darkagn
Hi AsinuS and welcome to DaniWeb :)

Can you post the query you are using to insert the xml? Also table information might help us to solve your problem too.

We'll start there (at the most basic...
Forum: MS SQL Dec 8th, 2008
Replies: 3
Views: 827
Posted By darkagn
Can you post your query?
Forum: MS SQL Dec 6th, 2008
Replies: 3
Views: 827
Posted By darkagn
You can use a JOIN to do this. You need to select the rows from each table, then describe how rows are related. Such a query will look something like this:


-- select rows
select...
Forum: MS SQL Oct 18th, 2008
Replies: 6
Views: 1,391
Posted By darkagn
Unfortunately different implementations of SQL can often have different ways of doing things. PostgreSQL is actually closer to PL/SQL and even MySQL than MSSQL in implementation. This means that...
Forum: MS SQL Oct 17th, 2008
Replies: 6
Views: 1,391
Posted By darkagn
What errors do you get when you try to run the queries?
Forum: MS SQL Oct 15th, 2008
Replies: 2
Views: 523
Posted By darkagn
You need to backup the database and then the .bak file that is created can be restored on another PC quite easily. Are you using SQL Management Studio?
Forum: MS SQL Jul 16th, 2008
Replies: 2
Views: 787
Posted By darkagn
The only thing I would say is that since you have a Foreign Key in Amount called Invoice_id, you will need to update the Invoice table before the Amount table. If you try to insert into Amount table...
Forum: MS SQL Dec 26th, 2007
Replies: 5
Views: 1,041
Posted By darkagn
Hi Sebouh,

I'm not 100% sure how to do what you want, but Java does have quite a few sql libraries in its API known as the JDBC. If you post your question in the Java forum, someone with more...
Showing results 1 to 23 of 23

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC