Re: VARCHAR to INT
From: Sanka (Sanka_at_discussions.microsoft.com)
Date: 07/06/04
- Next message: joe: "questions about 70-228 exam"
- Previous message: Aaron [SQL Server MVP]: "Re: SQL Bug: Column Value/Identity"
- In reply to: Wayne Snyder: "Re: VARCHAR to INT"
- Next in thread: Aaron [SQL Server MVP]: "Re: VARCHAR to INT"
- Reply: Aaron [SQL Server MVP]: "Re: VARCHAR to INT"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 6 Jul 2004 10:08:01 -0700
ISNumeric function allows float, decimal numbers also... which is not acceptable in my system...
The others two suggestions were helpful..
Thanks all for the immediate resposes...
Cheers,
Sanka
"Wayne Snyder" wrote:
> You might also take a look at the isnumeric function..
>
>
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
>
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
>
> "Sanka" <Sanka@discussions.microsoft.com> wrote in message
> news:752D4D77-A7B6-44EF-951F-274AB2EB85DB@microsoft.com...
> > Hi All,
> >
> > I have a table A with column C whose datatype is varchar(15) ,it contains
> in different values like 1234,abc12,N/A,123455667788 etc etc.
> >
> > Now I need to copy this data into table B with column D whose datatype is
> integer ,Now I need to pull only data which is a valid int.
> > For ex: only 1234 is valid integer in the above list
> >
> > Source Target
> > 1234 1234
> > abc12 NULL
> > N/A NULL
> > 123456789876 NULL
> >
> > Any Ideas...
> >
> > Cheers,
> > Sanka
>
>
>
- Next message: joe: "questions about 70-228 exam"
- Previous message: Aaron [SQL Server MVP]: "Re: SQL Bug: Column Value/Identity"
- In reply to: Wayne Snyder: "Re: VARCHAR to INT"
- Next in thread: Aaron [SQL Server MVP]: "Re: VARCHAR to INT"
- Reply: Aaron [SQL Server MVP]: "Re: VARCHAR to INT"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|