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: Bygbobbo
  • Order by date
  1. Bygbobbo

    sp_executesql within a function

    Anyone have a work around for using sp_executesql like in the situation below within a user defined function. EXEC sp_executesql @rule,N'@check_rule bit OUTPUT',@check_rule OUTPUT I have tested the function parts in query analyzer the results are what I want but when I create the function I...
  2. Bygbobbo

    DTS help. please.

    Check your systems group permissions. The latest windows patches may have changed some permissions or defaulted them for some specific groups. And definitely test your package execution from the command line on the SQL box logged in as SQLservice. If this errors then you will get a better...
  3. Bygbobbo

    SELECT TOP error

    i have run into this problem with non converted 6.5 SQL databases in a 2000 environment. Check to make sure that the database type is sql 8.0. You can try this though: Run your query from a known 8.0 version database (using query analyzer) and point it towards your database that your trying...
  4. Bygbobbo

    Remainder function

    I tried the help, I have no msdn loaded and can't find my library disks. When I do a search for Mod on microsofts msdn I cant find it. Thanks you get a star, for fast delivery. Bygs
  5. Bygbobbo

    Remainder function

    Thanks Do you have an example of how to use this.. I keep getting compilation errors Im not sure of the correct syntax. Bygs
  6. Bygbobbo

    Remainder function

    What is the Math function that returns the division remainder? Thanks in advance, Bygs
  7. Bygbobbo

    SP Union SP?

    You can avoid all that extra hokus - pokus. In your original query you mentioned that you may excede 4000 char. If you are dynamically creating your query, break it up into segments that you know will not execede any thing For example: set @sql_select = 'Select <field1>,<field2>,<fieldN>...
  8. Bygbobbo

    Cursor vs. temporary table. Declaring with local variables

    Yes, the function will be run on every record. A lot less code to manage also for that matter. A couple of reasons not to use cursors: (1) very resource intensive and slow. (2) may cause some bad table locking(when multiple instances are run) which will render your Database tables useless. (3)...
  9. Bygbobbo

    replace ' with &quot;

    An even better solution/practice is making a stored procedure on the SQL side that does the insert for you. if you pass in variables (with single ticks) from your asp to execute your stored proc, it will be inserted with a single tick. Then you don't have to handle the double tick later on when...
  10. Bygbobbo

    want to set a var in IF EXISTS subquery...can't

    I believe the If Exist() statement will only evaluate a true or false. I dont believe it supports holding/setting scope of a variable. Thats what makes the exists statements so efficient. Is there any reason why you dont set the variable before then evaluate? DECLARE @UserID int select...
  11. Bygbobbo

    Cursor vs. temporary table. Declaring with local variables

    What I have posted requires no cursor.... It will run the updates as records are being pulled dynamically..... I thought you were looking for a way to get the same thing done without cursors, which is what I recommend. Cursors should only be used as a last resort..... Very last resort. If...
  12. Bygbobbo

    Data Type Conversion

    I convert with the same yyyymmdd character format all the time. convert(datetime,SUBSTRING(@data_string, 54, 8)) the only way this will fail is if the date was not a legitimate date. For Example 20030832 If that doesnt work I have another method. hope this helps.. Bygs
  13. Bygbobbo

    How Query Analyzer treats Nulls

    Like I mentioned early when you use the utility to write to a file in Query Analyzer, it uses a text stream. So it is taking everything that is literal and writing it to the .txt. There is a way to turn off the NULLs in the query analyzer settings tab as a setting but I dont recommend it. DTS...
  14. Bygbobbo

    Using EXEC within Stored Procedure

    I think it really depends on how big your denormalized table is. If it is huge maybe some Indexes should be made according to the criteria being generated from your dynamic query. Is your EXEC(@strSQL) making numerous transactions. If that is the case you may want to break it up into...
  15. Bygbobbo

    Cursor vs. temporary table. Declaring with local variables

    user defined function executable within a stored proc should do the trick make your addUpdateColourDescription a user defined function CREATE PROCEDURE dbo.updateRNFdesc @locale AS char(2), @NRFColourCode AS varchar(50), @NRFDescription AS varchar(255) @descTableName AS varchar(50) AS...
  16. Bygbobbo

    How Query Analyzer treats Nulls

    try exporting this... select null as temp1, null as temp2, isnull(null,'') as temp3, isnull(null,'') as temp4 since its a text stream that is being written, instead of streaming a 'null' text it will be written as blank only when it is <null> If thats not what you are looking for please let...
  17. Bygbobbo

    dtsRun syntax

    I dont think you need the spaces after each switch either. dtsRun /SSERVER01444 /UMyUserName /PMyPassword /N&quot;dts package&quot; /Aglobalvar_name:8=&quot;globalvar value&quot; Make sure you have persmissions on the Box to run command lines hope that helps --bygs
  18. Bygbobbo

    Connection String for MS OLAP

    I am aware of the DSN - Less connections not being available in MX and Im a bit dissapointed that the flexibility has been taken away. That being the case have you ever added an OLAP Cube (MS SQL Server) to the ODBC settings. If so can you point me in the direction of some literature or the...
  19. Bygbobbo

    OLAP MDX expression. IMMEDIATE HELP!!!!

    if you supply other info then I can make you a sample MDX query with criteria set.
  20. Bygbobbo

    Create aliases in dimension

    You can reference your 1-12 to a made up table that has 2 fields 1 and January ect. Then re-create your dimension as a snowflake and incorporate your new table with the new field OR You can make a view of your existing dimension as long as its not huge and use star schema. When I say huge I...

Part and Inventory Search

Back
Top