|
Posted by sql guy123 on 10/02/22 11:52
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!!!
[Back to original message]
|