---
title: "LarsG"
type: "forum-member"
url: "https://www.webforum.nu/medlem/1222-larsg/page13"
joined: "2000-12-03T11:00:00.000Z"
posts: 12464
threads_started: 3
first_post: "2000-12-03T13:32:00.000Z"
last_post: "2011-12-01T12:32:22.000Z"
page: 13
pages: 50
language: "sv-SE"
site: "webForum — webforum.nu"
---

# LarsG

Medlem på webForum sedan 2000-12-03. 12464 inlägg i arkivet, 3 startade trådar.

## Inlägg (sida 13 av 50)

- [SQL2](https://www.webforum.nu/p/2108115) — 2008-05-05T12:08Z, Databaser & SQL
  > Flyttas från ASP
- [Använda SELECT i INSERT INTO](https://www.webforum.nu/p/2104640) — 2008-05-02T13:30Z, Databaser & SQL
  > Jag tror att det är så här @nders menar INSERT INTO [Order] (OrderID, Artnr, Antal) SELECT max(OrderID), @ArtNr, @Antal FROM [Bestallning]
- [Problem med sql sats](https://www.webforum.nu/p/2103912) — 2008-04-29T12:37Z, Databaser & SQL
  > select tbl1ID from tabell1 left join tabell2 on tabell1.tbl1ID = tabell2.tbl1ID and tabell2.varde='test' where tabell1.kontroll = 1 and tabell2.tbl1ID is null
- [hämta användare inom en visst tid](https://www.webforum.nu/p/2103755) — 2008-04-28T16:57Z, Databaser & SQL
  > använd funktionen dateadd
- [Grattis LarsG, Caya](https://www.webforum.nu/p/2103253) — 2008-04-25T08:15Z, Småprat
  > En får tacke för gratulationerna.
- [problem med distinct](https://www.webforum.nu/p/2102458) — 2008-04-22T07:32Z, Databaser & SQL
  > case when max(p.date) is not null then case when datediff(dd,getdate(),max(p.date)) = 0 then 'idag kl:' + substring(convert(varchar(20),max(p.date),8),1,5) else cast(max(p.date)…
- [problem med distinct](https://www.webforum.nu/p/2102341) — 2008-04-21T17:14Z, Databaser & SQL
  > SELECT c.CategoryId, c.Name, coalesce(max(postid),0) as PostId, sum(case when parentPostid = 0 then 1 else 0 end) as topics, sum(case when ParentPostId <> 0 then 1 else 0 end) AS…
- [problem med distinct](https://www.webforum.nu/p/2102327) — 2008-04-21T16:27Z, Databaser & SQL
  > Varför har du med denna om du bara vill visa kategoriinnehåll? isnull(p.PostId, 0) AS PostId,
- [sortera poster](https://www.webforum.nu/p/2102153) — 2008-04-20T19:21Z, Databaser & SQL
  > select p.Header, p.Message, p.Date. (select max(date) from forumposts where threadid = p.threadid) as lastpost from forumPost as p join aspnetUsers as u on u.UserId = p.UserId…
- [Endast köra om alla sql-satser kan utföras](https://www.webforum.nu/p/2101612) — 2008-04-17T15:55Z, PHP
  > Du misstar dig. Det går att ange foreign key när man skapar tabellen men den appliceras inte.
- [Endast köra om alla sql-satser kan utföras](https://www.webforum.nu/p/2101589) — 2008-04-17T14:44Z, PHP
  > Använd transaktioner. begin declare exit handler for sqlexception rollback; start transaction; insert into t2 select <kolumner> from t1 where <villkor>; delete from t1 where…
- [problem med SP](https://www.webforum.nu/p/2099906) — 2008-04-10T08:37Z, Databaser & SQL
  > isnull(s.LastName) skall vara isnull(s.LastName,'')
- [problem med SP](https://www.webforum.nu/p/2099896) — 2008-04-10T08:09Z, Databaser & SQL
  > Hur ser din fråga ut?
- [problem med SP](https://www.webforum.nu/p/2099888) — 2008-04-10T07:43Z, Databaser & SQL
  > isnull(s.lastname + ',' + isnull(...),'saknas') WHERE c.DepartmentId = @DepartmentId or @departmentId = 0
- [problem med SP](https://www.webforum.nu/p/2099728) — 2008-04-09T17:04Z, Databaser & SQL
  > if (@MobilePhone != null) är aldrig sant. Använd if (@MobilePhone is not null)
- [Senaste inlägg+antal nyliga inlägg av användare](https://www.webforum.nu/p/2096175) — 2008-04-07T15:22Z, Databaser & SQL
  > selet author, post, postDate, (select count() from posts where author = p.author) from posts as p where postDate = (select max(postDate) from posts where posts.author = p.author)
- [Uppdatering från en tabell till en annan](https://www.webforum.nu/p/2096170) — 2008-04-07T15:06Z, Databaser & SQL
  > SQL server update oldtable set comment = n.comment, oth = n.oth from oldtable o join newtable n on o.id = n.id
- [Hämta från två tabeller!](https://www.webforum.nu/p/2096167) — 2008-04-07T15:00Z, Databaser & SQL
  > Det var för snabbt. Kan du ge exempel på datainnehåll i dina tabeller och förväntat resultat?
- [Hämta från två tabeller!](https://www.webforum.nu/p/2096159) — 2008-04-07T14:27Z, Databaser & SQL
  > SELECT re., us.Username AS Username, us.ID AS UserID, us.Picture FROM Users us LEFT JOIN ForumReplys AS re ON re.UserID = us.ID and re.ThreadID = $ThreadID ORDER BY DateAdded…
- [Uppdatering från en tabell till en annan](https://www.webforum.nu/p/2096158) — 2008-04-07T14:25Z, Databaser & SQL
  > update newTable set comment = (select comment from oldTable where oldTable.id = newTable.id)

---

Profilen på webben: https://www.webforum.nu/medlem/1222-larsg/page13  
Föregående sida: https://www.webforum.nu/medlem/1222-larsg/page12.md  
Nästa sida: https://www.webforum.nu/medlem/1222-larsg/page14.md
