|
Use # to delimit date:
Select * from journal1 where day between #01/03/2010# and #15/03/2010#
However, I am not sure how to tell Access if it is mm/dd/yyyy or dd/mm/yyyy. If you can use a parameterized query command, this will be easier.
|
|
|
|
|
If the column name is "day" you will most likely need brackets as in [day].
|
|
|
|
|
Well using # worked, but actually it expects the date to be completely reversed.
So if i use 'select * from journal1 where day>#15/03/2010#' it doesn't get any results, but if i use 'select * from journal1 where day>#2010/03/15#' it is working.
Is it possible to change this ?
Thanks.
|
|
|
|
|
Hi,
I have a nchar type in my sql with this kind of value '02 12', it stands for February 2012, is there a way that i can convert this value to DateTime data type in sql server.
i was tring these, but none of them are working:
*. select convert(DateTime, '02 12')
*. select cast('02 12' as DateTime)
any help will be greatly appreciated.
|
|
|
|
|
Not a chance, datetime requires a minimum of d/m/y. I would pad it out with something to end up with valid date information. Pick and arbitrary day, 1 or 15 and concat the string then use a date mast to convert it. Look ad convert/cast it will give you the mask types. Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You will have to convert your string in a valid datestring first. This should work:
declare @d as nchar(5)
set @d = '02 12'
select Cast('20'+ Right(@d, 2) + Left(@d,2) + '01' as datetime) Wout Louwers
|
|
|
|
|
Hi guys,
I have a problem when synchronizing web publication.
I begin by giving you an insight into my soft installed:
sql-server 2005
7even-windows so IIS7.5
I created a publication MaPublication.I made a right click on publication-> Release Local> MaPublication then I chose to configure synchronization Web.Then, next-> sql server mobile-> created a new directory select default website ->next->in Alias: SQLCE-> 2 messages appear successively OK OK-> next-> clients connect anonymously-> next-> OHH now when I click on the Edit tab to change a user account error message appears:
The program can not open the required dialog box because no location has been found.Close this message and try again
What is the problem? Is it a problem IIS??
Thank you for your contribution
Note: the MSDN help don't help me anymore so another propositionsmodified on Tuesday, March 16, 2010 1:03 PM
|
|
|
|
|
Hi Friends,
How to get a web page view source using sql stored procedure and then view source should be saved as a record in a table. Kindly please help me?
Thanks & Regards
Senthil Kumar.T.S
|
|
|
|
|
Getting the HTML source should be the job of your server side code and not the stored procedure.
|
|
|
|
|
Web page source is unassociated from SQL server unless you've got one really funky setup. Please elaborate on what you mean.
|
|
|
|
|
Hi Members
How to insert data in BFILE Data Type and retrieve data from BFILE Data Type?
Please help me
|
|
|
|
|
See here[^].Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
thanks for response
But how can i retrieve data through command.Please help me
|
|
|
|
|
Do a search on the internet. There is tons and tons of information available.
By looking at the examples, I believe you will need to use a streamwriter.
Go through this article here[^].Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
ok i search on net but i havn't found any running example.It may be my fault to understand.But before i ask question i always use google after that i ask question in forum.
Now you give me link.There is only i found create table and insert data into table through JAVA CODE.But i need simple use command in oracle(SQL*Plus).
Can you give me small example
Please help me
|
|
|
|
|
Have a look at this post here[^].
You can get your data but as SQL Plus is just a text editor, you will be unable to view your image.Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
|
Hi,
I have a Location table. I am wondering what should be its primary key.
LocationTbl
ID identity (1,1) not null
LocationCode not null
LocationName null
LocationDescrption null
Thanks
|
|
|
|
|
Is this a trick question? Obviously the PK is the identity column. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
ID seems like an obvious choice but it won't have any meaningful info to end users. If LocationCode is unique and is meaningful to users, I would choose it as the primary key.
|
|
|
|
|
I think you're missing the point with the primary key. It should never be visible to the end users! "When did ignorance become a point of view" - Dilbert
|
|
|
|
|
I do not agree that the primary key should never be visible to the end user but it is not a must have.
|
|
|
|
|
One of the key requirements for a primary key is that it must not change over time, and one of the best ways to achieve this is to use a surrogate key. Preferably an integer as most databases are tuned for queries on integers.
As it's only a part of the plumbing, the surrogate key has no need to ever be visible outside the DB. In particular, it should never be revealed to the user. This allows the DB administrator to change the representation of the keys at will if necessary.
I can think of very few circumstances when there's a sense in making a key visible to the end user. For example when it's used as a parameter in webpage request."When did ignorance become a point of view" - Dilbert
|
|
|
|
|
I agree.
|
|
|
|
|
Well said. I know the language. I've read a book. - _Madmatt
|
|
|
|