Showing posts with label remember. Show all posts
Showing posts with label remember. Show all posts

Monday, March 12, 2012

How do I format data in the SQL statement

It has been a couple of years but I remember being able to format numbers,
dates and text in SQL Server statements, can't find much in online books ,
Where can I relearn this, thanks
JimThat's a little vague but I think you are after CONVERT(). See BooksOnLine
for more details.
Andrew J. Kelly SQL MVP
"Jim Warren" <jmwarren@.msu.edu> wrote in message
news:u0WUchlCFHA.392@.TK2MSFTNGP14.phx.gbl...
> It has been a couple of years but I remember being able to format numbers,
> dates and text in SQL Server statements, can't find much in online books
> ,
> Where can I relearn this, thanks
> Jim
>|||Sorry
How do I make Number into zero decimal point i.e. 2.0000000 into 2. How do I
convert dates from 2005-1-14 to Jan 1, 2005. Is there a format statement of
some kind
Thanks
Jim
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:O9sU4llCFHA.1292@.TK2MSFTNGP10.phx.gbl...
> That's a little vague but I think you are after CONVERT(). See
> BooksOnLine for more details.
> --
> Andrew J. Kelly SQL MVP
>
> "Jim Warren" <jmwarren@.msu.edu> wrote in message
> news:u0WUchlCFHA.392@.TK2MSFTNGP14.phx.gbl...
>|||Yes. It's called CONVERT().
mk:@.MSITStore:C:\Program%20Files\Microso
ft%20SQL%20Server\80\Tools\Books\tsq
lref.chm::/ts_ca-co_2f3o.htm
However, CONVERT will not handle your first requirement. You will need to do
that in your client application.
PS. dates are not stored with any format. They are stored as pairs of
integers. You really need to start reading in Books Online (BOL)
Jim Warren wrote:
> Sorry
> How do I make Number into zero decimal point i.e. 2.0000000 into 2.
> How do I convert dates from 2005-1-14 to Jan 1, 2005. Is there a
> format statement of some kind
> Thanks
> Jim
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:O9sU4llCFHA.1292@.TK2MSFTNGP10.phx.gbl...
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"|||As I stated and Bob confirmed you would want to look at CONVERT() in
BooksOnLine. You can convert the decimal into an INT and that will loos the
decimal places.
Andrew J. Kelly SQL MVP
"Jim Warren" <jmwarren@.msu.edu> wrote in message
news:OI$46h3CFHA.1836@.tk2msftngp13.phx.gbl...
> Sorry
> How do I make Number into zero decimal point i.e. 2.0000000 into 2. How do
> I convert dates from 2005-1-14 to Jan 1, 2005. Is there a format statement
> of some kind
> Thanks
> Jim
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:O9sU4llCFHA.1292@.TK2MSFTNGP10.phx.gbl...
>

Friday, March 9, 2012

How do I find out whats blocking port 1433?

I am running SQL Server 2000 sp4 in local mode on my laptop. I have some
other software which uses 1433 to access SQL. Remember this is all running
locally on a laptop. Port 1433 is being blocked. I have both the Windows
Firewall and the Mcaffee Firewalls disabled.
How can I find out what is blocking the port?
How do you know it's an issue with a blocked port?
If you are receiving an error, post the exact error number
and all details of the message.
-Sue
On Tue, 27 Mar 2007 19:04:07 -0700, KenRoy
<KenRoy@.discussions.microsoft.com> wrote:

>I am running SQL Server 2000 sp4 in local mode on my laptop. I have some
>other software which uses 1433 to access SQL. Remember this is all running
>locally on a laptop. Port 1433 is being blocked. I have both the Windows
>Firewall and the Mcaffee Firewalls disabled.
>How can I find out what is blocking the port?
|||Are you sure you have TCP/IP enabled (and configured for port 1433)? Try
enabling Named Pipes and specify that in an alias and try to connect with QA
that way.
You can use the DOS tracert command to check paths from one ip point to
another.
TheSQLGuru
President
Indicium Resources, Inc.
"KenRoy" <KenRoy@.discussions.microsoft.com> wrote in message
news:69A0FF05-54DD-4135-B9BC-6EA2BECEDEF3@.microsoft.com...
>I am running SQL Server 2000 sp4 in local mode on my laptop. I have some
> other software which uses 1433 to access SQL. Remember this is all
> running
> locally on a laptop. Port 1433 is being blocked. I have both the Windows
> Firewall and the Mcaffee Firewalls disabled.
> How can I find out what is blocking the port?
|||Yes, I am sure it is enabled for port 1433.
"TheSQLGuru" wrote:

> Are you sure you have TCP/IP enabled (and configured for port 1433)? Try
> enabling Named Pipes and specify that in an alias and try to connect with QA
> that way.
> You can use the DOS tracert command to check paths from one ip point to
> another.
>
> --
> TheSQLGuru
> President
> Indicium Resources, Inc.
> "KenRoy" <KenRoy@.discussions.microsoft.com> wrote in message
> news:69A0FF05-54DD-4135-B9BC-6EA2BECEDEF3@.microsoft.com...
>
>
|||Tried to connect with Telnet (telnet localhost 1433) and it say's it blocked.
"Sue Hoegemeier" wrote:

> How do you know it's an issue with a blocked port?
> If you are receiving an error, post the exact error number
> and all details of the message.
> -Sue
> On Tue, 27 Mar 2007 19:04:07 -0700, KenRoy
> <KenRoy@.discussions.microsoft.com> wrote:
>
>
|||I have been trying to solve this problem myself over the last three days
having moved to a new dedicated server with a new host.
Old server was Win2k3 SP1
New server is Win2k3 SP2
I found that the IP Security policy was, by default, set to drop all
packets to 1433\1434.
Add the IP Security Policy snap in to MMC and you'll find it.
This change is in addition to configuring windows firewall.
Jarrod.
*** Sent via Developersdex http://www.codecomments.com ***

How do I find out whats blocking port 1433?

I am running SQL Server 2000 sp4 in local mode on my laptop. I have some
other software which uses 1433 to access SQL. Remember this is all running
locally on a laptop. Port 1433 is being blocked. I have both the Windows
Firewall and the Mcaffee Firewalls disabled.
How can I find out what is blocking the port'How do you know it's an issue with a blocked port?
If you are receiving an error, post the exact error number
and all details of the message.
-Sue
On Tue, 27 Mar 2007 19:04:07 -0700, KenRoy
<KenRoy@.discussions.microsoft.com> wrote:

>I am running SQL Server 2000 sp4 in local mode on my laptop. I have some
>other software which uses 1433 to access SQL. Remember this is all running
>locally on a laptop. Port 1433 is being blocked. I have both the Windows
>Firewall and the Mcaffee Firewalls disabled.
>How can I find out what is blocking the port'|||Are you sure you have TCP/IP enabled (and configured for port 1433)? Try
enabling Named Pipes and specify that in an alias and try to connect with QA
that way.
You can use the DOS tracert command to check paths from one ip point to
another.
TheSQLGuru
President
Indicium Resources, Inc.
"KenRoy" <KenRoy@.discussions.microsoft.com> wrote in message
news:69A0FF05-54DD-4135-B9BC-6EA2BECEDEF3@.microsoft.com...
>I am running SQL Server 2000 sp4 in local mode on my laptop. I have some
> other software which uses 1433 to access SQL. Remember this is all
> running
> locally on a laptop. Port 1433 is being blocked. I have both the Windows
> Firewall and the Mcaffee Firewalls disabled.
> How can I find out what is blocking the port'|||Yes, I am sure it is enabled for port 1433.
"TheSQLGuru" wrote:

> Are you sure you have TCP/IP enabled (and configured for port 1433)? Try
> enabling Named Pipes and specify that in an alias and try to connect with
QA
> that way.
> You can use the DOS tracert command to check paths from one ip point to
> another.
>
> --
> TheSQLGuru
> President
> Indicium Resources, Inc.
> "KenRoy" <KenRoy@.discussions.microsoft.com> wrote in message
> news:69A0FF05-54DD-4135-B9BC-6EA2BECEDEF3@.microsoft.com...
>
>|||Tried to connect with Telnet (telnet localhost 1433) and it say's it blocked
.
"Sue Hoegemeier" wrote:

> How do you know it's an issue with a blocked port?
> If you are receiving an error, post the exact error number
> and all details of the message.
> -Sue
> On Tue, 27 Mar 2007 19:04:07 -0700, KenRoy
> <KenRoy@.discussions.microsoft.com> wrote:
>
>|||I have been trying to solve this problem myself over the last three days
having moved to a new dedicated server with a new host.
Old server was Win2k3 SP1
New server is Win2k3 SP2
I found that the IP Security policy was, by default, set to drop all
packets to 1433\1434.
Add the IP Security Policy snap in to MMC and you'll find it.
This change is in addition to configuring windows firewall.
Jarrod.
*** Sent via Developersdex http://www.codecomments.com ***

How do I find out what Service Packs have been installed?

I'm using SQL Server Express on Vista. I can't remember whether or not I installed the service packs for SSEE. Is there a quick and easy way to find out?

hi,

you can query som server properties as (on my running server)

SET NOCOUNT ON; SELECT CONVERT( varchar, SERVERPROPERTY('Edition')) AS Edition , CONVERT( varchar, SERVERPROPERTY('ProductVersion')) AS Version , CONVERT( varchar, SERVERPROPERTY('ProductLevel')) AS Level --< Edition Version Level Express Edition 9.00.3159.00 SP2

regards