I am trying to understand temporary tables that begins with #
With a simple query the creates a query and drops a query. This work Okay.
CREATE TABLE [#TEMPTABLE](
[CardboardID] [int] NOT NULL,
[BuntchID] [int] IDENTITY(1,1) NOT NULL,
[FirstSerialNumber] [int] NULL...
I would like to thank you with a star for trying to help. Hope I spelled it right this time. ;-)
You have helped 1000 time and this time cant explain what I want.
Last question promise, can I get the these to values in red.
using BuntchID column with one SQL query?
Which is the...
I added GROUP BY TB.LASTSERIALNUMBER it works but the Max LastSerialNumber is 99926 and that is true, but I want to retrieve the value 83 because it is after 99999 it will start over from 00001.
Do you understand what trying to explain, I feel like an idiot right now.
I know you are very...
George, I like the way you did it.
With way you did it, would you get the value 83 even if you set it to MAX and the max is 99926, because that is exactly what I was looking for
Please help me, I will not ask a question in SQL forum for at least 1 month :-(
George
George, Are you shure that it is this what is causing the problem. Because you have 2 case statement and 3 end.
I am not an expert.
This is the error.
Msg 156, Level 15, State 1, Line 18
Incorrect syntax near the keyword 'ELSE'.
Msg 156, Level 15, State 1, Line 29
Incorrect syntax near the...
George, first of all, thank you for the response and thank you for trying to help me.
I feel like an idiot right now.
But I dont understand. This doesn't work.
@RetLastSerialNumberTemp =
CASE
CASE WHEN MAX(TB.LASTSERIALNUMBER) - MIN(TB.LASTSERIALNUMBER) > 5000
THEN
Case When...
I have done an application that the users scan the FirstSerialNumber and LastSerialNumber I have to keep track of the LastSerialNumber is comes in order with the FirstSerialNumber that is scanned.
If the LastSerialNumber is 99926 Then the FirstSerialNumber should be 99927.
After the number...
I have this SQL that work good.
SELECT CASE
WHEN MAX(B.LASTSERIALNUMBER) - MIN(B.LASTSERIALNUMBER) > 5000 THEN MIN(B.LASTSERIALNUMBER)
ELSE ISNULL(MAX(B.LASTSERIALNUMBER), 0)
END AS LastSerialNumber,
ISNULL(MAX(TB.LASTSERIALNUMBER), 0)
FROM ASSIGNMENT A
LEFT JOIN CARDBOARD CB ON...
What the F&¤#, a start for aspvbnetnerd.
What has happened to the world?
This is my first start ever, aspvbnetnerd so happy :-)
I like these SQL Teaser
George
Yes I only have to change the presentation layer, but it is alot of logic there
I have a class for data acces, class for printing, class for Active Directory logic, Class Datalist, Class for calling webservice.
All of them are implented trought Interfaces. This is okay.
There is alot of logic...
I have to created a vb.net windows application.
I would like to have this application to be a web application.
Is it possible for me to convert it to a web application?
George
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.