left() and right() function in MS SQL vs MS ACCESS



I normally use MS ACCESS vs MS SQL,, which has a left() and right()
function. I need to use MS SQL for this project but I am not familiar
with it. I have read a few books, but can not figure out how to do
this. Please help.

If I need to compare the first 4 letters of a field, with the first
four letters of another field, how can I do this?

Select field1, field2 FROM table1 Where left(field1,4)=left(field2,4)

(MS SQL does not have left() and right() functions)

Please help.

In addition, I have a CSV file with data like 10.20, which I import
inrto a numberic field. Unforunately the value gets changed to 10.
It's seems to get rounded. How can I fix this.
The import SQL I use is....

BULK INSERT dbo.table
FROM 'c:\MYDATA.CSV
WITH
(
FIRSTROW = 1,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)


Thank you in advance!!!

.



Relevant Pages

  • Re: Checking for numeric strings in LINQ to SQL
    ... identified using a three character alphanumeric code. ... Codes are either all letters or all numeric ... Well, actually, why can't you do it just as in SQL? ... This should translate to the statement above. ...
    (microsoft.public.dotnet.framework)
  • RE: Criteria for a Select Query
    ... Clearly you are missing the ( ... It would help if you provided the full SQL view from your query. ... join properties for those three fields to show only records where the joined ... matched the full name and not just the first three letters of the field. ...
    (microsoft.public.access.queries)
  • RE: Criteria for a Select Query
    ... FROM 834F, [Potential Members] ... I'm trying to match up the first three letters of the Last and First ... It would help if you provided the full SQL view from your query. ...
    (microsoft.public.access.queries)
  • Re: Subtitutes for English /T/ and /D/
    ... is that we pronounce the IBM product CICS as "kicks" but SQL as its ... letters and not "sequel". ... letters but SQL as "sequel". ... I think that one may be complicated by the existence of SeQueL as a brand name. ...
    (sci.lang)
  • Re: Referencing a Caculated Field in another Calculated Field
    ... Perhaps if you post the SQL of your current query we can suggest a specific solution. ... The ability to do so is dependent on many factors but the most important factor is that you have followed the guidelines for naming your tables and fields (only letters, numbers, and underscore characters used and start the name with a letter). ... John Spencer ...
    (microsoft.public.access.queries)