Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2005
    Location
    SW England
    Posts
    102

    Unanswered: newbie how to create temp table and populate

    Sorry guys I know this is easy but I've been looking for about an hour for a straight forward explanation.
    I want to store a user's wish list while they browse the site, then they can send me an enquiry populated with their choices.
    Basically, a shopping cart!
    I thought of using session variables and string manipulations but I am more comfortable with DB queries.
    a simple 4 column table would cover everything.
    SQL server and VBScript
    Thanks
    M

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578

  3. #3
    Join Date
    Oct 2005
    Location
    SW England
    Posts
    102
    thanks, that was the first one I found on Google, but it just confused me.

    just after I posted my Query I looked again on Google and found this:
    http://www.programmers-corner.com/article/76 which seemed to be more my level!
    I am currently having a go.

  4. #4
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    ;-) well Google is your friend.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  5. #5
    Join Date
    Oct 2005
    Location
    SW England
    Posts
    102
    aye,
    Here you go Newbies, the three statement to create a temp table, insert some values and retrieve them:
    Code:
    CREATE TABLE #myTempTable
    (
      DummyField1 INT,
      DummyField2 VARCHAR(20)
    )
    -------------------------
    INSERT into #myTempTable (DummyField1, DummyField2) VALUES (1,2)
    -------------------------
    SELECT * from #myTempTable
    I new it wasn't rocket science, sometimes just writing to a forum clears your mind...enought to formulate the correct query for Google! doh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •