DateTime data type stores both date and time.
when data is given like '04/04/2006' is taken as 04/04/2006 0hrs 0min
that is why dates stored having time greater than 0hrs are not listed.
1. take dd, mm, yyyy seperately from the column
2. concatenate them into one string
3. convert to datetime using CONVERT function
CONVERT (data_type [(length)], expression [, style])
you can use the next date as you have already did.
I am not able to add a foreign key in a table in SQL Server 2005 Compact Edition using ALTER TABLE command.I had tried adding in the same way as in SQL Server 2005 but it dint work out. Kindly some one guide me.
These two tables have two common fields: AccountId and Symbol. What I want to do is to get all the data from both tables based on the same accountid and the same symbol. If one table (A) doesn't contain the account or symbol in the other table (B), just fill the column in table (A) with blanks. The result should look like:
The columns Fee and Price in Table1 don't have relationship with the columns Share and Dollar in Table2. All I need is to display data from both table based on Account and Symbol. And I need to do it using T-SQL.
SELECT IsNull(T1.AccountID, T2.AccountID) AS AccountID,
ISNull(T1.Symbol, T2.Symbol) AS Symbol,
T1.Fee, T1.Price, T2.Share, T2.Dollar
FROM Table1 AS T1 FULL OUTER JOIN Table2 AS T2
ON T1.AccountID = T2.AccountID AND T1.Symbol = T2.Symbol
ORDER BY AccountID, Symbol
This is the complete query to get your output.........
SELECT accountid=case when isnull(a.AccountID,'')='' then b.accountid else a.accountid end,
symbol=case when isnull(a.Symbol,'')='' then b.Symbol else a.Symbol end
, a.Fee, a.Price,
FROM tableA a
FULL outer JOIN tableB b on a.AccountID = b.AccountID AND a.Symbol = b.Symbol
order by accountid,symbol
I would like to know if sql 2005 express edition will allow me to create web services. what i want to do is write an application that will be able to communicate to a sql database via http. i also addtional help in creating the web service, i'm new to sql 2005 and need all the help i can get.
Yes I believe you can create a web service in SQL Server Express. I think for the msot part Express will most everything the full version will as far as web service - could be wrong though. Check out this article:
When I view a table withen DataGridView . for eg .. then rows count on the table is 5 rows .. you found at the end of rows on the dataagrid control a balck area with the back color ,,,
Can I make the DatagridView Countinue view it's rows even it is empty ..