Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Oracle Formats to SqlServer Formats

Author  Topic 

Lathu
Starting Member

10 Posts

Posted - 2011-08-19 : 06:47:36
In Oracle I have a Query with "where" condition as,

to_number(to_char(BK.CO_NET_DATE,'MMYYYY')) = 022010

I want this condition in Sql Server.

Can anyone help me pls...............




Sorry to all

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2011-08-19 : 06:51:38
quote:

I want this immediately,


Read a book then or pay a consultant. People here give their time for free.

Yes, I could tell you how to do it, but you wouldn't learn and you'd still have a bad attitude when asking for help.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-19 : 07:08:04
i cant give you a hint. have a look at CAST CONVERT in books online or google

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-19 : 07:15:53
quote:
Originally posted by Lathu

RickD,
Stop sulking abt my attitude , introspect yourself about your attitude and your Head Strong Character. Don't ever show your attitude and flase prestige towards othes.

Me new to SqlServer here.
Don't forget u also new to SqlServer once upon a time.

I think u have some M _ _ _ _ L problem.



Lathu
Please show some basic courtesy and understand that people here are offering help for free. Its really irritating when we see posts with words like i want it urgent etc
The question posted by you was one of very basic ones and could have easily got solution by some basic googling. I'm sure Rick's intention was to make you try and get the solution yourself rather than spoon feeding you by which you will not gain anything.
You can always ask in case of any doubt but dont expect spoon fed answers on all occasions. We're more than happy to help as long as you're ready to learn and apply yourselves on it.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Lathu
Starting Member

10 Posts

Posted - 2011-08-19 : 07:53:53
Sorry Mr.Rick Davis.

I will never behave like dis again.

And thanX for ur Suggestion Mr.Visakh

Thank U Very Much.
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2011-08-19 : 07:59:07
Thats ok, I didn't see your reply (except the quoted one in visakh's post).

Just never ask for a reply immediately and try to learn things yourself. We will help if you want to help yourself. You will be ignored generally if you go around telling people you want an answer immediately without trying yourself.
Go to Top of Page

mmarovic
Aged Yak Warrior

518 Posts

Posted - 2011-08-24 : 14:01:04
Besides the where condition you posted is not the best solution on oracle either. You can't take advantage of index on date column that way. So the better solution on sql server (and equivalent one on oracle) is:

bc.con_net_date >= '20100201 00:00:00' and bc.con_net_date < '20100301 00:00:00'


A great article for beginners about the topic: [url]http://www.sql-server-performance.com/2004/datetime-datatype/[/url]

Mirko

My blog: http://mirko-marovic-eng.blogspot.com/
Go to Top of Page
   

- Advertisement -