Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. dan1967

    VBA EXcel get row number

    Try ActiveCell.Row Dan.
  2. dan1967

    Day of week

    You can use the DateName function. datename(dw, '3/25/2005') will return Friday. Dan.
  3. dan1967

    Exporting results of stored procedure

    You can run it comma separated and save the results to a CSV file. Go into Tools->Options and in the Results tab select Comma Separated from the Results Output Format drop down. Dan.
  4. dan1967

    Alphabatize by last name in outlook

    I just tried doing that, and I couldn't change the global address book. This will only work with items in your Contacts folder, or any user created address books. Dan.
  5. dan1967

    Convert Date "24-Jan-04" to "1/24/2004"

    Try doing the following. Create a local variable of the datetime type and populate with your value, then you will be able to convert to American date format. declare @dt as datetime select @dt = '24-Jan-04' select convert(char(20), @dt, 101) Dan.
  6. dan1967

    Excel - removing year from date values

    Glad I could help. Dan.
  7. dan1967

    Excel - removing year from date values

    Create a new column and enter the following formula in the first cell and drag down your entire column: =TEXT(A1,"mm/dd") Cell A1 should oviously be replaced with the actual cell that contains your complete date. You should now be able to sort by the actual mon/day. Dan.
  8. dan1967

    Best Way to Import Excel Data into SQL Server Table

    Here is another way I have done it using the Bulk Insert command: BULK INSERT TableName FROM 'c:\FileName.txt' WITH ( FIELDTERMINATOR = '\t', ROWTERMINATOR = '\n' ) GO I did this using a tab delimited text file. The rowterminator value '\n' is a newline feed. Dan.
  9. dan1967

    Best Way to Import Excel Data into SQL Server Table

    One thing that worked for me in the past is to create a linked server to the Excel file: exec sp_addlinkedserver @server= 'ExcelSource', @provider= 'Microsoft.Jet.OLEDB.4.0', @srvproduct= 'Jet 4.0', @datasrc= 'c:\FileName.xls' go {enter your input code here} go exec sp_dropserver @server=...
  10. dan1967

    UNION of data question

    The thing about UNION queries is that all queries being UNIONed need to have the same output columns with the same data types. For example, if query1 has Name, Age, Salary query 2 needs to have Name, Age, Salary. Dan.
  11. dan1967

    Display worksheet name in cell a1

    There is no standard function for this. You can create your own and attach it to your worksheet. Should be pretty simple: Function ShtName() ShtName = ActiveSheet.Name End Function Dan.
  12. dan1967

    format 3/1/2004 to 20040301 (yyyymmdd)?

    Try using the following: select replace(convert(char(10), getdate(), 121), '-', '') CONVERT is changing the date to the format yyyy-mm-dd hh:mi:ss.mmm(24h), and only returning the first 10 characters. REPLACE is removing the '-' only leaving you with the format you are looking for. Dan.
  13. dan1967

    Error Message 'The table is ambiguous'

    Try fully qualifying highercategoryid with the servername.owner.databasename.highercategoryid. Dan.
  14. dan1967

    SIMPLE ?? Solution

    Do you have a date field that shows the datetime the record was updated? Do you have a record number that could show the order the records were created? Is there something in the note column value that could be used to show incrementation (did I just make this word up)? If no to all of these...
  15. dan1967

    Outlook, need to auto reply based on Subject.

    I don't really write scripts in Outlook. Have you tried setting up a rule (Tools->Rules Wizard)? Dan.
  16. dan1967

    Outlook, need to auto reply based on Subject.

    Try: If objItem.Subject Like "*Ticket*" Then For x = 0 To 9 PlayWavFile "c:\WINDOWS\Media\siren.wav", True Next Exit Sub End If Dan.
  17. dan1967

    Bug? Range function?

    That would turn off when you restart Excel. Dan.
  18. dan1967

    Bug? Range function?

    Sounds like you might have a stuck keyboard key (Shift). Do you have any problems with any other apps? Dan.
  19. dan1967

    OPENQUERY

    Sorry I couldn't help more. Maybe someone else will add their ideas. Dan.
  20. dan1967

    OPENQUERY

    This is my last idea. Try giving your table an alias: SELECT * FROM OPENQUERY(LinkedServer, 'SELECT * from LinkedServer.test.dbo.Table1 t where t.name=''test''' ) Dan.

Part and Inventory Search

Back
Top