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 SkipVought 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: *

  • Users: MKVAB
  • Order by date
  1. MKVAB

    XML String - SQL 2000 vs 2005 Issue

    Well, I've been able to get the work around to return correctly. The above does do the same thing. It's just that my real statement is MUCH longer and my error was occuring when writting the XML string to a variable. Apparently you can SET a variable to an XML string in 2005, but not so in...
  2. MKVAB

    XML String - SQL 2000 vs 2005 Issue

    Thanks Borislav! Unfortunetly, I don't have the flexibility to change the attributes in anyway. I thought I figured out a way. By doing this: SELECT * FROM Customers FOR XML AUTO, ELEMENTS It worked fine independently, but when I run it in my script I get "Incorrect syntax...
  3. MKVAB

    XML String - SQL 2000 vs 2005 Issue

    SQL 2000 doesn't support FOR XML RAW with ELEMENTS. I am reverse engineering an app and I need to be able to produce results as they would appear if I was doing this: SELECT * FROM Customers FOR XML RAW('Customer'), ELEMENTS But, my DB is a 2000 server, not a 2005. Ideas on how...
  4. MKVAB

    Alternative to bcp

    Thanks SQLDenis. I've actually been hunting for a download page for SSIS with no luck yet... SSIS might not be an option for us though, as we may be moving away from SQL Server in the near future. So, implementing something that could be time consuming isn't really practical. I think we...
  5. MKVAB

    Alternative to bcp

    I'm looking for some other way to write the data set from a stored proc out to a file. I've always used bcp, and have never found or known of another utility. We have users who pick up the files that our stored proc write out with their automated processes to load the data into their systems...
  6. MKVAB

    Alternative to bcp

    I've had a lot of issues with bcp in SQL Server 2005 - the data will often not sort correctly even when using the ORDER hint. Anybody know of an alternative to bcp? thanks! -MK
  7. MKVAB

    Insert by Column Number, Not Name

    Thanks for the reply Phil and SQLSister. The table (temp table) is built dynmically to accomodate data from a pivot table whose columns are created dynamically. The data will always be varchar(25). I extrapolate the columns from the query (date ranges with sums in the pivot) so the columns...
  8. MKVAB

    Insert by Column Number, Not Name

    Is it possible to do an insert by column number??? Like... INSERT INTO tabname 3 VALUES('some insert') --> 3 being the column number Thing is, I've got a stored procedure that builds a table dynamically. I need to insert a value into the table but I can't do a simple insert because the number...
  9. MKVAB

    BULK INSERT to skip last x rows

    Thanks ESquared! I was thinking something similar to that too. If I could get the count of the number of lines in the file, I could set LASTROW = that number - 5 (5 being the static rows at the end of the file). But, I haven't figured out how to do that yet. :( I'm going to try to get one of...
  10. MKVAB

    BULK INSERT to skip last x rows

    Thanks Phil! Not to sound too green, but what would I use to strip out lines in a file? Is there a way to do this from within SQL Server? Thanks again! -MK
  11. MKVAB

    BULK INSERT to skip last x rows

    Hello all! I am writing a BULK INSERT statement that loads a variable length file that I receive daily. However, the last lines of this file contain a few lines of HTML that is causing the BULK INSERT to fail. Is there a way I can have BULK INSERT load all records and stop when it sees a certain...
  12. MKVAB

    Seeking System Table for Comments

    Thank you!!! Exactly what I was looking for! For others: here's a query to grab the column and table name. select sysobjects.name TableName, syscolumns.name ColumnName, sysproperties.Value ColumnComment from syscolumns inner join sysproperties on...
  13. MKVAB

    Seeking System Table for Comments

    Anybody know which system table contains the actual comments for tables? I can find stored procedure text and column defaults in syscomments, but not the actual attribute's comments. Ideas? Thanks! -MK
  14. MKVAB

    Variable Assignment Optimization

    Yep! That works marvelous! Thank you SQLBill! The 2nd SELECT, good question! I guess I've just always done it that way. Not anymore! Thank you! -MK
  15. MKVAB

    Variable Assignment Optimization

    I found a good article: http://vyaskn.tripod.com/differences_between_set_and_select.htm It talks about doing this: SELECT @Variable1 = 1, @Variable2 = 2 But, can you do something like that with a WHERE clause? Humm....
  16. MKVAB

    Variable Assignment Optimization

    Call me lazy... BUT, Is there any way to make this one assignment statement: DECLARE @Variable1 int DECLARE @Variable2 int DECLARE @Criteria int SET @Criteria = 123 SELECT @Variable1 = ( SELECT Field1 FROM Table WHERE SearchField = @Criteria ) SELECT @Variable2 =...
  17. MKVAB

    Table Attributes & Strange Behavior

    Jay, thanks for the response! It is the same database. Nigel, YES! I wasn't paying attention to the data type before. That explains it. Thank you! Explanation: The field is an nvarchar field (not sure why it was created as a unicode data type, but it is). A unicode data type takes up twice as...
  18. MKVAB

    Table Attributes & Strange Behavior

    Okay, this is very strange... I was attempting an insert into a table. The insert fails because the value I'm inserting is too long for, say Field1. The string I was inserting into Field1 was 55 characters long. I did sp_help [TableName] to see the length of Field1 and it said it was...
  19. MKVAB

    Select accross servers

    Thanks for the response! Sorry for the delay! My problem did originate from not having the remote server set up in linked servers. Works wonderfully now. Thanks again. -MK
  20. MKVAB

    Select accross servers

    Can somebody give me the basic syntax to perform SELECT/UPDATE statements across servers??? Verbiage: The ultimate purpose is to update a remote DB with all information that is later than what is currently there. I want to: 1. SELECT the MAX value from the remote DB 2. Perform an INSERT with...

Part and Inventory Search

Back
Top