Click here to Skip to main content
15,510,771 members
Home / Discussions / Database
   

Database

 
Questionibtogo64.dll error Pin
Dhyanga25-Sep-22 7:06
Dhyanga25-Sep-22 7:06 
AnswerRe: ibtogo64.dll error Pin
Richard MacCutchan25-Sep-22 7:51
mveRichard MacCutchan25-Sep-22 7:51 
GeneralRe: ibtogo64.dll error Pin
Dhyanga25-Sep-22 8:52
Dhyanga25-Sep-22 8:52 
GeneralRe: ibtogo64.dll error Pin
Richard MacCutchan25-Sep-22 9:03
mveRichard MacCutchan25-Sep-22 9:03 
GeneralRe: ibtogo64.dll error Pin
Dhyanga25-Sep-22 9:15
Dhyanga25-Sep-22 9:15 
GeneralRe: ibtogo64.dll error Pin
Richard Deeming25-Sep-22 22:45
mveRichard Deeming25-Sep-22 22:45 
QuestionJust trying to get the count that meets the criteria Pin
jkirkerx4-Sep-22 14:58
professionaljkirkerx4-Sep-22 14:58 
AnswerRe: Just trying to get the count that meets the criteria Pin
CHill605-Sep-22 3:28
mveCHill605-Sep-22 3:28 
You could use a CTE to identify the records that match then count. Bit hard to help without sample data though. Example:
SQL
;with cte as 
(
	SELECT distinct
    p.project_no
    FROM @project p
    INNER JOIN @commission_summary cs ON cs.project_no = p.project_no             
    WHERE p.sales_no = @designerId 
    AND (p.status = 'construction' OR p.status = 'finished') 
    AND (cs.startup_check_date is NULL OR CONVERT(char(10), cs.startup_check_date, 120) = '1900-01-01' OR CONVERT(char(10), cs.startup_check_date, 120) >= '2021-01-01') 
    AND (cs.finished_check_date is NULL OR CONVERT(char(10), cs.finished_check_date, 120) = '1900-01-01' OR CONVERT(char(10), cs.finished_check_date, 120) >= DATEADD(month, -1, GETDATE()) )
)    
select COUNT(*)                            
from cte

I would question all those CONVERTs - surely commission_summary.startup_check_date is a date not a string?
GeneralRe: Just trying to get the count that meets the criteria Pin
jkirkerx5-Sep-22 9:11
professionaljkirkerx5-Sep-22 9:11 
GeneralRe: Just trying to get the count that meets the criteria Pin
jkirkerx5-Sep-22 9:41
professionaljkirkerx5-Sep-22 9:41 
GeneralRe: Just trying to get the count that meets the criteria Pin
CHill605-Sep-22 22:05
mveCHill605-Sep-22 22:05 
GeneralRe: Just trying to get the count that meets the criteria Pin
CHill605-Sep-22 22:07
mveCHill605-Sep-22 22:07 
GeneralRe: Just trying to get the count that meets the criteria Pin
jkirkerx6-Sep-22 6:37
professionaljkirkerx6-Sep-22 6:37 
GeneralRe: Just trying to get the count that meets the criteria Pin
Richard Deeming6-Sep-22 22:23
mveRichard Deeming6-Sep-22 22:23 
GeneralRe: Just trying to get the count that meets the criteria Pin
jkirkerx7-Sep-22 7:22
professionaljkirkerx7-Sep-22 7:22 
GeneralRe: Just trying to get the count that meets the criteria Pin
CHill608-Sep-22 0:59
mveCHill608-Sep-22 0:59 
QuestionMSSQL select values in one row by group Pin
Sergey Makarov 20222-Sep-22 6:45
Sergey Makarov 20222-Sep-22 6:45 
AnswerRe: MSSQL select values in one row by group Pin
OriginalGriff2-Sep-22 6:47
mveOriginalGriff2-Sep-22 6:47 
GeneralRe: MSSQL select values in one row by group Pin
Sergey Makarov 20222-Sep-22 6:49
Sergey Makarov 20222-Sep-22 6:49 
QuestionAzure Synapse Data Flow Linked Data Set table not populating Pin
j11codep2-Sep-22 3:38
j11codep2-Sep-22 3:38 
GeneralAnyone here use Snowflake Pin
Mike Ahrens30-Aug-22 10:37
professionalMike Ahrens30-Aug-22 10:37 
GeneralRe: Anyone here use Snowflake Pin
PIEBALDconsult30-Aug-22 13:57
professionalPIEBALDconsult30-Aug-22 13:57 
GeneralRe: Anyone here use Snowflake Pin
Mycroft Holmes30-Aug-22 13:59
professionalMycroft Holmes30-Aug-22 13:59 
GeneralRe: Anyone here use Snowflake Pin
PIEBALDconsult30-Aug-22 14:22
professionalPIEBALDconsult30-Aug-22 14:22 
GeneralRe: Anyone here use Snowflake Pin
CHill601-Sep-22 4:25
mveCHill601-Sep-22 4:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.