|
You would add 49 days to the first date to get the second date. I'm not being funny here about the syntax, because the exact syntax differs between databases.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
i want to design a feedback form n which i have kept a multiline textbox for putting comments of the user and then hit the submit button to submit the comment into the database. but when i want to retrive those comments from the database & view them in a grid,i just got the continious lines of data...my requirement is i want to view the data in that manner and style in which i have enterd it during the submission process with the same style and manner...can anybody help me in this regard how to do it or can give me any link regarding this..(like paragraph,heading...etc..)
thanks in advance..
pradip kishore
|
|
|
|
|
Pradip Kishore wrote: but when i want to retrive those comments from the database & view them in a grid,i just got the continious lines of data
Actually you don't. You get the data exactly as it was put in to the database. Multiple lines and all. The problem is the way browsers render HTML. They view your text as HTML and in HTML a carriage return or newline character does not signify a new line. You must replace the newlines with <br/> in order to be formatted properly in the web page.
So, this becomes an ASP.NET problem, not a database problem.
|
|
|
|
|
what is the difference between Layred Arctitecture and Non Layred Arctitecture?
ashu
|
|
|
|
|
Ashutosh Kumar Gupta wrote: what is the difference between Layred Arctitecture and Non Layred Arctitecture?
A layered architecute separates the database from the business logic from the presentation of the information.
A non-layered architecture is sometimes pejoratively called the giant ball of mud architecture. And for good reason, in all but the smallest of projects the code in a non-layered architecture will event resemble a giant ball of mud. Finding anything in that ball of mud becomes increasingly difficult.
|
|
|
|
|
|
create querry to drop a row from table
pradeep kulkarni
|
|
|
|
|
pradeep kulkarni wrote: create querry to drop a row from table
You DROP objects, you DELETE rows.
DELETE FROM MyTable
WHERE primaryKey = 123
|
|
|
|
|
drop table table name;
fuhgldfugyfdkjdluikhusjgh
|
|
|
|
|
|
How can i copy a column from one table to another (data and schema) at runtime in vs 2005?
the data and schema are read from xml files
-- modified at 8:44 Sunday 14th January, 2007
rzvme
|
|
|
|
|
Write an sp, that will do that and call it from your code.
The sp (for SQL server) will look something like this:
INSERT INTO [InsertDB].[dbo].[InsertTable]<br />
( [ColumnName1],[ColumnName2] )<br />
SELECT [ColumnName1],[ColumnName2]<br />
FROM [SourceDB].[dbo].[SourceTable]
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
how to create table in SQL, give one example
pradeep kulkarni
|
|
|
|
|
pra47 wrote: how to create table in SQL, give one example
Look up the SQL syntax for the CREATE TABLE statement in Google or in a reference book. You will need to supply, at a minimum, the field name and field type for each field that you want the table to contain.
HTH
|
|
|
|
|
I have a table Named 'Roles' which contains 'ID' and 'ParentID' fields.
Some Sample Data is
ID ,Name ,ParentID
1 ,Admin ,0
2 ,Manager ,1
3 ,Front Office User ,1
4 ,Supervisor ,2
5 ,Inventory User ,0
6 ,Human Resource User ,4
I would like to extract data of Parent and all children.
SELECT b.[ID] as 'Parent', a.[ID] as 'Role'
FROM Roles a
INNER JOIN Roles b
ON a.ParentID = b.[ID] and a.ParentID=1
which can return only.
ID ,ParentID
1 ,2
1 ,3
My wanted form is
ParentID ,ID
1 ,2
1 ,3
2 ,4
4 ,6
Like an organization tree, the top parent level can access all lower level nodes.
Sql 2005 support that feature.
How can I access them in Sql2000 recursive function or store procedure?
Thanks
May Thu San.
|
|
|
|
|
I think you made a little mistake in your query. This should work:
SELECT b.[ID] as 'Parent', a.[ID] as 'Role'<br />
FROM Roles a<br />
INNER JOIN Roles b<br />
ON a.ParentID = b.[ID]
Wout Louwers
|
|
|
|
|
Sorry, My Query is
SELECT b.[ID] as 'Parent', a.[ID] as 'Role'
FROM Roles a
INNER JOIN Roles b
ON a.[ParentID] = b.[ID] and a.ParentID=1
Some Sample Data is
ID ,Name ,ParentID
1 ,Admin ,0
2 ,Manager ,1
3 ,Front Office User ,1
4 ,Supervisor ,2
5 ,Inventory User ,0
6 ,Human Resource User ,4
The above query can only show the first two child of ID 1 (which are 2,3) and did not show the child of parent 2 and 3...etc.
How can I get all children?
|
|
|
|
|
May Thu san wrote: The above query can only show the first two child of ID 1 (which are 2,3) and did not show the child of parent 2 and 3...etc.
How can I get all children?
by removing the "and a.ParentID=1" from the query.
|
|
|
|
|
I think I understand what you want now. But this cannot be easily solved whit the ParentID. This[^] article should help you.
Wout Louwers
|
|
|
|
|
how to write the query to get the records in between dates
|
|
|
|
|
SELECT * FROM TableName WHERE DateFieldName BETWEEN '1-JAN-07' AND '31-JAN-07'
|
|
|
|
|
how to use sql in host languages like c / c++
|
|
|
|
|
Have you had a look at LINQ?
|
|
|
|
|
how to display all tables from any single database in sql server 7.0.
|
|
|
|
|
select * from Sysdatabases where xtype='u'
|
|
|
|