Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Datatypes. A Perl T-SQL comparison

by mpeppler (Vicar)
on Nov 16, 2005 at 16:37 UTC ( #509095=note: print w/replies, xml ) Need Help??


in reply to Datatypes. A Perl T-SQL comparison

This has nothing to do with perl, but the real reason why you get "incorrect syntax near cast" is that you need to use CAST in a select statement - just using CAST by itself makes no sense.

So something like

select CAST(@number_of_years AS INT)
would produce reasonable output.

Of course me I'd have declared @number_of_years as INT, and then used convert() or cast() in the assignments directly...

Michael

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://509095]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2020-11-24 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?