Results 1 to 2 of 2

Thread: Cast in sql

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908

    Cast in sql

    i have a column in sql sever declaring as float.
    and there are times i wanted to insert the word : N. A into the column..
    wat is the right expression for inserting the char?

    ie
    Insert xxx Into xxx values(' " & Cast ( 'N.A' As float) & " ')
    this the above statment correct?..or do i omit commas or colon etc? thanks

  2. #2
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611
    In a float field you can't store chars. You can mark some records by leaving the field blank, <NULL> , or by putting a special value in it (-666.111222333).
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width