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 Chriss Miller 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: christer99
  • Content: Threads
  • Order by date
  1. christer99

    Weird converting datetime error

    Getting Syntax error converting datetime from character string when doing: SET @SQL=' CONVERT(DateTime,"'+@v_excldate +'") AS DD' @v_excldate is set to 2006-01-01 00:00:00.000 full code below. Appreciate any help. declare @SQL VARCHAR(8000) DECLARE @v_excldate DATETIME set @v_excldate=...
  2. christer99

    can I link a table using a variable

    Can I link tables using a variable? (in example below @polvar ) The variable corresponds to a column table. The above code doesn't work select * FROM PolicyType PolicyType_1 INNER JOIN PROSP ON PolicyType_1.TYPE = @polvar LEFT OUTER JOIN...
  3. christer99

    Dynamic column records when doing an insert

    How do I dynamically change one column value in the source when doing an insert? The column TYPE0 has 5 different COLUMN names, TYPE1, TYPE2, TYPE3, TYPE4 and TYPE5, and thus I need to loop the insert statement 5 times) and change the source each time. INSERT INTO dbo.OpDetails (ACCREC...
  4. christer99

    Seconds missing when insert datetime into SQL database

    When interserting date and time from an ASP page using Recordset.Update commanded, into a SQL database, the seconds are missing. It is working, if I do the same insert directly from SQL, but not from the ASP page. The seconds are missing so instead of 3:15:22 PM, 3:15:00 PM is being inserted...
  5. christer99

    Seconds missing when insert datetime

    When I insert this value 5/22/2007 2:28:04 into a datetime field, the seconds are "missing". Instead of 2:28:04, I end up with 2:28:00 being recorded to the SQL table. Any ideas?
  6. christer99

    how to select the ID of the latest modified record

    How would I select the ID of the latest modified record? I have tried max(OPMarketing.MID), but that just gives me the latest ID (MID) and not the ID of the latest modified record. Select TOP 1 will not working as I am looking for multiple rows (grouped by BCOID. Any help would be appreciated...
  7. christer99

    select latest value

    How do I select the latest quote value for each opportunity group (GROUPOPID)? The statement below just list all the quotes and not the latest for each groupopid. If I do MAX(QUOTE) I just sent get the maximum value and not the latest quote (which might be less than the maximum). I appreciate...
  8. christer99

    trying to pass a variable into an IN statement

    I am having a problem passing a variable into an IN statement, such as WHERE convert(nvarchar(3),opid) in ( @param10). Any help would be appreciated? declare @param1 DATETIME, @param2 VARCHAR(3), @param4 VARCHAR(4000), @param5 MONEY, @param6 VARCHAR(50), @param7 VARCHAR(20), @param8...
  9. christer99

    How do I get the results from three rows into one?

    I know this is probably simple, but the query below may produce multiple rows of data (unless it is grouped). How do I get the result to be one row as one string, for example rowa.wordstring +rowb.wordstring + rowc.wordstring SELECT OppName FROM OpInfo WHERE (GROUPOPID = 129)
  10. christer99

    All records in one field

    I need to get the results of the query below into one record (and not multiple rows). The query below produces the following rows/results: 1 2 4 5 8 Using a SQL select statement, can I get the result to be '1, 2, 4, 5, 8' I will not ahead of time how many records or what is the range, but we...
  11. christer99

    The role 'WSS_Content_Application_Pools' already exists in the current

    Trying to upgrade from Sharepoint Team Services 2.0 to version 3.0, but getting this error when running the configuration wizard in the EventViewer: Unknown SQL Exception 15363 occurred. Additional error information from SQL Server is included below. The role 'WSS_Content_Application_Pools'...
  12. christer99

    Method 'Microsoft.VisualBasic.Strings.Replace' not found.

    Getting this error Method 'Microsoft.VisualBasic.Strings.Replace' not found. in Visual Studio 2005 at compile time. for this line: propfiles3 = Microsoft.VisualBasic.Strings.Replace(propfiles3, ".dot", "") Have tried with and without: Imports Microsoft.VisualBasic
  13. christer99

    variable undeclared or was never assigned.

    After converting from Visual Studio 2003 to 2005, I am getting this error/warning which prevents me from seeing the design view. Any help would be appreciated? The variable 'propfiles' is either undeclared or was never assigned. C:\ProposalGenerator2\ProposalGenerator\Form27.vb 1107 0...
  14. christer99

    Getting variable unclear or never assigned for string array

    After converting from Visual Studio 2003 to 2005, I am getting this error/warning which prevents me from seeing the design view. Any help would be appreciated? The variable 'propfiles' is either undeclared or was never assigned. C:\ProposalGenerator2\ProposalGenerator\Form27.vb 1107 0...
  15. christer99

    Need help with RSS Feed

    I am new to XML, and I can't this to work. I am getting no action (no data when I view this page on a webbrowser). <?xml version="1.0"?><!-- DWXMLSource="http://www.weather.gov/alerts/wwarssget.php?zone=NYZ070" --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"...
  16. christer99

    Making sure record does not exist before inserting

    I have this Store Procedure that inserts records into my CSRProg table. I added a line to prevent that an existing record is being added: if not exists (select * from CSRPRog where pol_idx=@param2 and exp=@param4) However, if I try simulate trying to add the same record twice on after on...
  17. christer99

    How do I insert multiple records into one field?

    How would I insert multiple records from one table into one field/column into another table. When I ran the query below I am only get the first value inserted and not all of them update roundingtype set pccodes = pccodes+' '+ a.type from ( SELECT top 500 TYPE FROM POLICY WHERE...
  18. christer99

    CROSS JOIN, ONE TABLE HAS NO DATA

    How would I join two tables, using CROSS JOIN, or another method, if one table might have no rows (it could have rows, but it could also have no rows). There is no common identifier, so CROSS JOIN is the only alternative as I can see it. However, if one table has no data (no rows), the statement...
  19. christer99

    case else statement confusion - HELP

    How do I set the REWR column below with a "case else" statement as opposed to running two different SQL update statements just to set something either 'Y' or 'N' ?? UPDATE POLICY SET REWR='Y' WHERE (EXISTS (SELECT 'x' FROM POLICY B INNER JOIN...
  20. christer99

    How can this be true?

    d1dif = 4.83742342 if (CDbl(d1dif)>0 and CDbl(d1dif) <2) then it shouldn't execute above as d1dif is more than 2. Any ideas?

Part and Inventory Search

Back
Top